- Timestamp:
- 2010-03-12T23:02:29Z (15 years ago)
- Branches:
- master
- Children:
- 1be0d26
- Parents:
- 547c94c
- Location:
- protocols/yahoo
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/yahoo/libyahoo2.c
r547c94c r7053379 1317 1317 struct yahoo_data *yd = yid->yd; 1318 1318 1319 struct user { 1320 char *name; /* 7 name */ 1321 int state; /* 10 state */ 1322 int flags; /* 13 flags, bit 0 = pager, bit 1 = chat, bit 2 = game */ 1323 int mobile; /* 60 mobile */ 1324 char *msg; /* 19 custom status message */ 1325 int away; /* 47 away (or invisible) */ 1326 int buddy_session; /* 11 state */ 1327 int f17; /* 17 in chat? then what about flags? */ 1328 int idle; /* 137 seconds idle */ 1329 int f138; /* 138 state */ 1330 char *f184; /* 184 state */ 1331 int f192; /* 192 state */ 1332 int f10001; /* 10001 state */ 1333 int f10002; /* 10002 state */ 1334 int f198; /* 198 state */ 1335 char *f197; /* 197 state */ 1336 char *f205; /* 205 state */ 1337 int f213; /* 213 state */ 1338 } *u; 1319 struct yahoo_process_status_entry *u; 1339 1320 1340 1321 YList *users = 0; … … 1346 1327 } 1347 1328 1348 u = NULL; 1329 /* Status updates may be spread accross multiple packets and not 1330 even on buddy boundaries, so keeping some state is important. 1331 So, continue where we left off, and only add a user entry to 1332 the list once it's complete (301-315 End buddy). */ 1333 u = yd->half_user; 1349 1334 1350 1335 for (l = pkt->hash; l; l = l->next) { … … 1354 1339 case 300: /* Begin buddy */ 1355 1340 if (!strcmp(pair->value, "315") && !u) { 1356 u = y _new0(struct user, 1);1341 u = yd->half_user = y_new0(struct yahoo_process_status_entry, 1); 1357 1342 } 1358 1343 break; … … 1360 1345 if (!strcmp(pair->value, "315") && u) { 1361 1346 users = y_list_prepend(users, u); 1362 u = NULL;1347 u = yd->half_user = NULL; 1363 1348 } 1364 1349 break; … … 1381 1366 if (!u) { 1382 1367 /* This will only happen in case of a single level message */ 1383 u = y_new0(struct user, 1);1368 u = y_new0(struct yahoo_process_status_entry, 1); 1384 1369 users = y_list_prepend(users, u); 1385 1370 } … … 1451 1436 while (users) { 1452 1437 YList *t = users; 1453 struct user*u = users->data;1438 struct yahoo_process_status_entry *u = users->data; 1454 1439 1455 1440 if (u->name != NULL) { -
protocols/yahoo/yahoo2_types.h
r547c94c r7053379 196 196 197 197 void *server_settings; 198 199 struct yahoo_process_status_entry *half_user; 198 200 }; 199 201 … … 261 263 }; 262 264 265 struct yahoo_process_status_entry { 266 char *name; /* 7 name */ 267 int state; /* 10 state */ 268 int flags; /* 13 flags, bit 0 = pager, bit 1 = chat, bit 2 = game */ 269 int mobile; /* 60 mobile */ 270 char *msg; /* 19 custom status message */ 271 int away; /* 47 away (or invisible) */ 272 int buddy_session; /* 11 state */ 273 int f17; /* 17 in chat? then what about flags? */ 274 int idle; /* 137 seconds idle */ 275 int f138; /* 138 state */ 276 char *f184; /* 184 state */ 277 int f192; /* 192 state */ 278 int f10001; /* 10001 state */ 279 int f10002; /* 10002 state */ 280 int f198; /* 198 state */ 281 char *f197; /* 197 state */ 282 char *f205; /* 205 state */ 283 int f213; /* 213 state */ 284 }; 285 263 286 #ifdef __cplusplus 264 287 }
Note: See TracChangeset
for help on using the changeset viewer.