Commit 49f1321f authored by Thomas Wentzel's avatar Thomas Wentzel

Change type in message_action and message_media from int to unsigned.

parent 6c239205
...@@ -722,9 +722,9 @@ void interpreter (char *line UU) { ...@@ -722,9 +722,9 @@ void interpreter (char *line UU) {
RET; RET;
} }
struct message *M = message_get (num); struct message *M = message_get (num);
if (M && !M->service && M->media.type == (int)CODE_message_media_photo) { if (M && !M->service && M->media.type == CODE_message_media_photo) {
do_load_photo (&M->media.photo, 1); do_load_photo (&M->media.photo, 1);
} else if (M && !M->service && M->media.type == (int)CODE_decrypted_message_media_photo) { } else if (M && !M->service && M->media.type == CODE_decrypted_message_media_photo) {
do_load_encr_video (&M->media.encr_video, 1); // this is not a bug. do_load_encr_video (&M->media.encr_video, 1); // this is not a bug.
} else { } else {
printf ("Bad msg id\n"); printf ("Bad msg id\n");
...@@ -737,9 +737,9 @@ void interpreter (char *line UU) { ...@@ -737,9 +737,9 @@ void interpreter (char *line UU) {
RET; RET;
} }
struct message *M = message_get (num); struct message *M = message_get (num);
if (M && !M->service && M->media.type == (int)CODE_message_media_photo) { if (M && !M->service && M->media.type == CODE_message_media_photo) {
do_load_photo (&M->media.photo, 2); do_load_photo (&M->media.photo, 2);
} else if (M && !M->service && M->media.type == (int)CODE_decrypted_message_media_photo) { } else if (M && !M->service && M->media.type == CODE_decrypted_message_media_photo) {
do_load_encr_video (&M->media.encr_video, 2); // this is not a bug. do_load_encr_video (&M->media.encr_video, 2); // this is not a bug.
} else { } else {
printf ("Bad msg id\n"); printf ("Bad msg id\n");
...@@ -752,7 +752,7 @@ void interpreter (char *line UU) { ...@@ -752,7 +752,7 @@ void interpreter (char *line UU) {
RET; RET;
} }
struct message *M = message_get (num); struct message *M = message_get (num);
if (M && !M->service && M->media.type == (int)CODE_message_media_video) { if (M && !M->service && M->media.type == CODE_message_media_video) {
do_load_video_thumb (&M->media.video, 1); do_load_video_thumb (&M->media.video, 1);
} else { } else {
printf ("Bad msg id\n"); printf ("Bad msg id\n");
...@@ -765,7 +765,7 @@ void interpreter (char *line UU) { ...@@ -765,7 +765,7 @@ void interpreter (char *line UU) {
RET; RET;
} }
struct message *M = message_get (num); struct message *M = message_get (num);
if (M && !M->service && M->media.type == (int)CODE_message_media_video) { if (M && !M->service && M->media.type == CODE_message_media_video) {
do_load_video_thumb (&M->media.video, 2); do_load_video_thumb (&M->media.video, 2);
} else { } else {
printf ("Bad msg id\n"); printf ("Bad msg id\n");
...@@ -778,9 +778,9 @@ void interpreter (char *line UU) { ...@@ -778,9 +778,9 @@ void interpreter (char *line UU) {
RET; RET;
} }
struct message *M = message_get (num); struct message *M = message_get (num);
if (M && !M->service && M->media.type == (int)CODE_message_media_video) { if (M && !M->service && M->media.type == CODE_message_media_video) {
do_load_video (&M->media.video, 1); do_load_video (&M->media.video, 1);
} else if (M && !M->service && M->media.type == (int)CODE_decrypted_message_media_video) { } else if (M && !M->service && M->media.type == CODE_decrypted_message_media_video) {
do_load_encr_video (&M->media.encr_video, 1); do_load_encr_video (&M->media.encr_video, 1);
} else { } else {
printf ("Bad msg id\n"); printf ("Bad msg id\n");
...@@ -793,9 +793,9 @@ void interpreter (char *line UU) { ...@@ -793,9 +793,9 @@ void interpreter (char *line UU) {
RET; RET;
} }
struct message *M = message_get (num); struct message *M = message_get (num);
if (M && !M->service && M->media.type == (int)CODE_message_media_video) { if (M && !M->service && M->media.type == CODE_message_media_video) {
do_load_video (&M->media.video, 2); do_load_video (&M->media.video, 2);
} else if (M && !M->service && M->media.type == (int)CODE_decrypted_message_media_video) { } else if (M && !M->service && M->media.type == CODE_decrypted_message_media_video) {
do_load_encr_video (&M->media.encr_video, 2); do_load_encr_video (&M->media.encr_video, 2);
} else { } else {
printf ("Bad msg id\n"); printf ("Bad msg id\n");
...@@ -991,9 +991,9 @@ void interpreter (char *line UU) { ...@@ -991,9 +991,9 @@ void interpreter (char *line UU) {
RET; RET;
} }
struct message *M = message_get (num); struct message *M = message_get (num);
if (M && !M->service && M->media.type == (int)CODE_message_media_audio) { if (M && !M->service && M->media.type == CODE_message_media_audio) {
do_load_audio (&M->media.video, 1); do_load_audio (&M->media.video, 1);
} else if (M && !M->service && M->media.type == (int)CODE_decrypted_message_media_audio) { } else if (M && !M->service && M->media.type == CODE_decrypted_message_media_audio) {
do_load_encr_video (&M->media.encr_video, 1); do_load_encr_video (&M->media.encr_video, 1);
} else { } else {
printf ("Bad msg id\n"); printf ("Bad msg id\n");
...@@ -1006,9 +1006,9 @@ void interpreter (char *line UU) { ...@@ -1006,9 +1006,9 @@ void interpreter (char *line UU) {
RET; RET;
} }
struct message *M = message_get (num); struct message *M = message_get (num);
if (M && !M->service && M->media.type == (int)CODE_message_media_audio) { if (M && !M->service && M->media.type == CODE_message_media_audio) {
do_load_audio (&M->media.video, 2); do_load_audio (&M->media.video, 2);
} else if (M && !M->service && M->media.type == (int)CODE_decrypted_message_media_audio) { } else if (M && !M->service && M->media.type == CODE_decrypted_message_media_audio) {
do_load_encr_video (&M->media.encr_video, 2); do_load_encr_video (&M->media.encr_video, 2);
} else { } else {
printf ("Bad msg id\n"); printf ("Bad msg id\n");
...@@ -1047,9 +1047,9 @@ void interpreter (char *line UU) { ...@@ -1047,9 +1047,9 @@ void interpreter (char *line UU) {
RET; RET;
} }
struct message *M = message_get (num); struct message *M = message_get (num);
if (M && !M->service && M->media.type == (int)CODE_message_media_document) { if (M && !M->service && M->media.type == CODE_message_media_document) {
do_load_document (&M->media.document, 1); do_load_document (&M->media.document, 1);
} else if (M && !M->service && M->media.type == (int)CODE_decrypted_message_media_document) { } else if (M && !M->service && M->media.type == CODE_decrypted_message_media_document) {
do_load_encr_video (&M->media.encr_video, 1); do_load_encr_video (&M->media.encr_video, 1);
} else { } else {
printf ("Bad msg id\n"); printf ("Bad msg id\n");
...@@ -1062,9 +1062,9 @@ void interpreter (char *line UU) { ...@@ -1062,9 +1062,9 @@ void interpreter (char *line UU) {
RET; RET;
} }
struct message *M = message_get (num); struct message *M = message_get (num);
if (M && !M->service && M->media.type == (int)CODE_message_media_document) { if (M && !M->service && M->media.type == CODE_message_media_document) {
do_load_document (&M->media.document, 2); do_load_document (&M->media.document, 2);
} else if (M && !M->service && M->media.type == (int)CODE_decrypted_message_media_document) { } else if (M && !M->service && M->media.type == CODE_decrypted_message_media_document) {
do_load_encr_video (&M->media.encr_video, 2); do_load_encr_video (&M->media.encr_video, 2);
} else { } else {
printf ("Bad msg id\n"); printf ("Bad msg id\n");
......
...@@ -264,7 +264,7 @@ struct document { ...@@ -264,7 +264,7 @@ struct document {
}; };
struct message_action { struct message_action {
int type; unsigned type;
union { union {
struct { struct {
char *title; char *title;
...@@ -279,7 +279,7 @@ struct message_action { ...@@ -279,7 +279,7 @@ struct message_action {
}; };
struct message_media { struct message_media {
int type; unsigned type;
union { union {
struct photo photo; struct photo photo;
struct video video; struct video video;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment