Ver Fonte

fix http twitter

MalekSediqi há 9 anos atrás
pai
commit
a019b1fa09
2 ficheiros alterados com 5 adições e 4 exclusões
  1. 2 2
      contentparser.c
  2. 3 2
      main.c

+ 2 - 2
contentparser.c

@@ -105,7 +105,7 @@ void parsetimezone(char* content)
 
 void TwitterParser(char* content)
 {
-    char tweet = atoi(content);
-    printf("%d", tweet);
+    char* tweet = content;
+    printf("%s", tweet);
     displayTwitter(1,tweet);
 }

+ 3 - 2
main.c

@@ -223,9 +223,9 @@ THREAD(AlarmSync, arg)
             isAlarmSyncing = true;
             char url[49];
             sprintf(url, "/getAlarmen.php?radiomac=%s&tz=%d", getMacAdress(), getTimeZone());
-            sprintf(url, "%s%s", "/getTwitter.php", getMacAdress());
             httpGet(url, parseAlarmJson);
-            httpGet(url2,TwitterParser);
+            sprintf(url,"/getTwitter.php?radiomac=%s&tz=%d", getMacAdress());
+            httpGet(url,TwitterParser);
             isAlarmSyncing = false;
         }
         NutSleep(3000);
@@ -390,6 +390,7 @@ int main(void)
                         stopStream();
 					}else if(KbGetKey() == KEY_LEFT)
                     {
+
                     }
 				}
 			}