Changeset 7869e48 for libfaim/rxhandlers.c
- Timestamp:
- Jan 12, 2013, 1:43:13 PM (12 years ago)
- Children:
- e3a0d71, 4485285
- Parents:
- 4626016
- git-author:
- Jason Gross <jgross@mit.edu> (01/12/13 13:13:18)
- git-committer:
- Jason Gross <jgross@mit.edu> (01/12/13 13:43:13)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libfaim/rxhandlers.c
r54666e0 r7869e48 112 112 if (snac.flags & 0x0001) { 113 113 /* 114 * This means the SNAC will be followed by another SNAC with 115 * related information. We don't need to do anything about 114 * This means the SNAC will be followed by another SNAC with 115 * related information. We don't need to do anything about 116 116 * this here. 117 117 */ … … 119 119 if (snac.flags & 0x8000) { 120 120 /* 121 * This packet contains the version of the family that this SNAC is 122 * in. You get this when your SSI module is version 2 or higher. 123 * For now we have no need for this, but you could always save 121 * This packet contains the version of the family that this SNAC is 122 * in. You get this when your SSI module is version 2 or higher. 123 * For now we have no need for this, but you could always save 124 124 * it as a part of aim_modnsac_t, or something. The format is... 125 * 2 byte length of total mini-header (which is 6 bytes), then TLV 126 * of type 0x0001, length 0x0002, value is the 2 byte version 125 * 2 byte length of total mini-header (which is 6 bytes), then TLV 126 * of type 0x0001, length 0x0002, value is the 2 byte version 127 127 * number 128 128 */ … … 132 132 for (cur = (aim_module_t *)sess->modlistv; cur; cur = cur->next) { 133 133 134 if (!(cur->flags & AIM_MODFLAG_MULTIFAMILY) && 134 if (!(cur->flags & AIM_MODFLAG_MULTIFAMILY) && 135 135 (cur->family != snac.family)) 136 136 continue; … … 155 155 for (cur = (aim_module_t *)sess->modlistv; cur; cur = cur->next) { 156 156 157 if (!(cur->flags & AIM_MODFLAG_MULTIFAMILY) && 157 if (!(cur->flags & AIM_MODFLAG_MULTIFAMILY) && 158 158 (cur->family != snac.family)) 159 159 continue; … … 193 193 msg = aim_tlv_getstr(tlvlist, 0x000b, 1); 194 194 195 if ((userfunc = aim_callhandler(sess, fr->conn, AIM_CB_FAM_SPECIAL, AIM_CB_SPECIAL_CONNERR))) 195 if ((userfunc = aim_callhandler(sess, fr->conn, AIM_CB_FAM_SPECIAL, AIM_CB_SPECIAL_CONNERR))) 196 196 ret = userfunc(sess, fr, code, msg); 197 197 … … 221 221 }; 222 222 static const int maxchannels = 5; 223 223 224 224 /* XXX: this is ugly. and big just for debugging. */ 225 225 static const char *literals[14][25] = { 226 {"Invalid", 226 {"Invalid", 227 227 NULL 228 228 }, 229 {"General", 229 {"General", 230 230 "Invalid", 231 231 "Error", … … 252 252 "NOP" 253 253 }, 254 {"Location", 254 {"Location", 255 255 "Invalid", 256 256 "Error", 257 257 "Request Rights", 258 "Rights Information", 259 "Set user information", 260 "Request User Information", 261 "User Information", 258 "Rights Information", 259 "Set user information", 260 "Request User Information", 261 "User Information", 262 262 "Watcher Sub Request", 263 263 "Watcher Notification" 264 264 }, 265 {"Buddy List Management", 266 "Invalid", 267 "Error", 265 {"Buddy List Management", 266 "Invalid", 267 "Error", 268 268 "Request Rights", 269 269 "Rights Information", 270 "Add Buddy", 271 "Remove Buddy", 272 "Watcher List Query", 273 "Watcher List Response", 274 "Watcher SubRequest", 275 "Watcher Notification", 276 "Reject Notification", 277 "Oncoming Buddy", 270 "Add Buddy", 271 "Remove Buddy", 272 "Watcher List Query", 273 "Watcher List Response", 274 "Watcher SubRequest", 275 "Watcher Notification", 276 "Reject Notification", 277 "Oncoming Buddy", 278 278 "Offgoing Buddy" 279 279 }, 280 {"Messeging", 281 "Invalid", 282 "Error", 280 {"Messeging", 281 "Invalid", 282 "Error", 283 283 "Add ICBM Parameter", 284 "Remove ICBM Parameter", 284 "Remove ICBM Parameter", 285 285 "Request Parameter Information", 286 286 "Parameter Information", 287 "Outgoing Message", 287 "Outgoing Message", 288 288 "Incoming Message", 289 289 "Evil Request", 290 "Evil Reply", 290 "Evil Reply", 291 291 "Missed Calls", 292 "Message Error", 292 "Message Error", 293 293 "Host Ack" 294 294 }, 295 {"Advertisements", 296 "Invalid", 297 "Error", 295 {"Advertisements", 296 "Invalid", 297 "Error", 298 298 "Request Ad", 299 299 "Ad Data (GIFs)" 300 300 }, 301 {"Invitation / Client-to-Client", 301 {"Invitation / Client-to-Client", 302 302 "Invalid", 303 303 "Error", … … 305 305 "Invitation Ack" 306 306 }, 307 {"Administrative", 307 {"Administrative", 308 308 "Invalid", 309 309 "Error", … … 317 317 "Account Delete Reply" 318 318 }, 319 {"Popups", 319 {"Popups", 320 320 "Invalid", 321 321 "Error", 322 322 "Display Popup" 323 323 }, 324 {"BOS", 324 {"BOS", 325 325 "Invalid", 326 326 "Error", … … 334 334 "Server Error" 335 335 }, 336 {"User Lookup", 336 {"User Lookup", 337 337 "Invalid", 338 338 "Error", … … 340 340 "Search Response" 341 341 }, 342 {"Stats", 342 {"Stats", 343 343 "Invalid", 344 344 "Error", … … 346 346 "Report Events" 347 347 }, 348 {"Translate", 348 {"Translate", 349 349 "Invalid", 350 350 "Error", … … 352 352 "Translate Reply", 353 353 }, 354 {"Chat Navigation", 354 {"Chat Navigation", 355 355 "Invalid", 356 356 "Error", … … 360 360 "Request Occupant List", 361 361 "Search for Room", 362 "Outgoing Message", 362 "Outgoing Message", 363 363 "Incoming Message", 364 "Evil Request", 365 "Evil Reply", 364 "Evil Request", 365 "Evil Reply", 366 366 "Chat Error", 367 367 } … … 375 375 family = aimbs_get16(&frame->data); 376 376 subtype = aimbs_get16(&frame->data); 377 377 378 378 if ((family < maxf) && (subtype+1 < maxs) && (literals[family][subtype] != NULL)) 379 379 faimdprintf(sess, 0, "bleck: channel %s: null handler for %04x/%04x (%s)\n", channels[frame->hdr.flap.type], family, subtype, literals[family][subtype+1]); … … 388 388 389 389 } 390 390 391 391 return 1; 392 392 } … … 471 471 472 472 for (cur = (struct aim_rxcblist_s *)src->handlerlist; cur; cur = cur->next) { 473 aim_conn_addhandler(sess, dest, cur->family, cur->type, 473 aim_conn_addhandler(sess, dest, cur->family, cur->type, 474 474 cur->handler, cur->flags); 475 475 } … … 554 554 } 555 555 556 /* 556 /* 557 557 * This doesn't have to be called here. It could easily be done 558 558 * by a seperate thread or something. It's an administrative operation,
Note: See TracChangeset
for help on using the changeset viewer.