Changeset 11258
- Timestamp:
- Sep 23, 2010, 5:05:40 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gtk/tr-core.c
r11197 r11258 1590 1590 readResponseIdle( void * vresponse ) 1591 1591 { 1592 GByteArray * response;1593 1592 tr_benc top; 1594 1593 int64_t intVal; 1595 int tag; 1596 struct pending_request_data * data; 1597 1598 response = vresponse; 1594 GByteArray * response = vresponse; 1595 1599 1596 tr_jsonParse( NULL, response->data, response->len, &top, NULL ); 1600 tr_bencDictFindInt( &top, "tag", &intVal ); 1601 tag = (int)intVal; 1602 1603 data = g_hash_table_lookup( pendingRequests, &tag ); 1604 if( data && data->responseFunc ) 1605 (*data->responseFunc)(data->core, &top, data->responseFuncUserData ); 1597 1598 if( tr_bencDictFindInt( &top, "tag", &intVal ) ) 1599 { 1600 const int tag = (int)intVal; 1601 struct pending_request_data * data = g_hash_table_lookup( pendingRequests, &tag ); 1602 if( data ) { 1603 if( data->responseFunc ) 1604 (*data->responseFunc)(data->core, &top, data->responseFuncUserData ); 1605 g_hash_table_remove( pendingRequests, &tag ); 1606 } 1607 } 1606 1608 1607 1609 tr_bencFree( &top ); 1608 g_hash_table_remove( pendingRequests, &tag );1609 1610 g_byte_array_free( response, TRUE ); 1610 1611 return FALSE;
Note: See TracChangeset
for help on using the changeset viewer.