Mercurial > pidgin
annotate plugins/crazychat/face.c @ 13905:4e44ecb866bd
[gaim-migrate @ 16394]
msn_session_sync_users() iterates over the buddy list, following the ->next pointers of the groups, contacts, and buddies. msn_show_sync_issue(), if called, removed the buddy for which it was called, in preparation for the buddy either being added to the server list or confirmed-to-be-removed. This could lead to the buddy pointer being released and ->next therefore being junk.
The buddy is now not removed until the user responds to the action dialog presented via msn_show_sync_issue(). I'm unclear why gtkgaim got away with this exercise in memory stomping but Adium/libgaim crashed every time, but it's safer in any case.
I also changed some foo->bar to gaim_foo_get_bar().
committer: Tailor Script <tailor@pidgin.im>
| author | Evan Schoenberg <evan.s@dreskin.net> |
|---|---|
| date | Sun, 02 Jul 2006 09:37:25 +0000 |
| parents | ed017b9c532d |
| children |
| rev | line source |
|---|---|
| 11218 | 1 #include "face.h" |
| 2 #include "sharky.h" | |
| 3 #include "doggy.h" | |
| 4 #include <assert.h> | |
| 5 | |
| 6 FACE init_face(KIND kind) | |
| 7 { | |
| 8 FACE face; | |
| 9 face = (FACE)malloc(sizeof(*face)); | |
| 10 | |
| 11 switch(kind){ | |
| 12 case DOG: | |
| 13 init_dog(face); | |
| 14 break; | |
| 15 case SHARK: | |
| 16 init_shark(face); | |
| 17 break; | |
| 18 default: | |
| 19 printf("default face\n"); | |
| 20 init_dog(face); | |
| 21 break; | |
| 22 } | |
| 23 return face; | |
| 24 } | |
| 25 | |
| 26 void draw_face(FACE face, GLfloat zrot, GLfloat yrot, BOOL left_eye, BOOL right_eye, GLfloat mouth_open, DIRECTION dir, OUTPUT_MODE mode){ | |
| 27 face->draw_func(face, zrot, yrot, left_eye, right_eye, mouth_open, dir, mode); | |
| 28 } | |
| 29 | |
| 30 void change_materials(FACE f, int* mats, int num_change){ | |
| 31 int i; | |
| 32 assert(!(num_change<0 || num_change>NUM_PARTS)); | |
| 33 for(i=0;i<num_change;i++){ | |
| 34 f->mat_indeces[i]=mats[i]; | |
| 35 } | |
| 36 } | |
| 37 | |
| 38 void free_face(FACE f){} |
