Browse Source

Fixed but at fortunes test.

David Moreno 11 years ago
parent
commit
0444757f98
8 changed files with 17 additions and 18 deletions
  1. 15 16
      onion/base_html.c
  2. BIN
      onion/base_html.o
  3. BIN
      onion/fortunes_html.o
  4. BIN
      onion/hello
  5. 1 1
      onion/hello.c
  6. BIN
      onion/hello.o
  7. BIN
      onion/libonion_static.a
  8. 1 1
      onion/onion

+ 15 - 16
onion/base_html.c

@@ -65,43 +65,42 @@ void base_html(onion_dict *context, onion_response *res){
   onion_response_write(res, "<!DOCTYPE html>\n"
       "<html>\n"
       "  <head>\n"
-      "    <meta content=\"text/html; charset=UTF-8\" http-equiv=\"content-type\"/>\n"
-      "    <title>", 116);
-#line 5
+      "    <title>", 43);
+#line 4
   {
-#line 5
+#line 4
     const char *tmp;
-#line 5
+#line 4
     tmp=onion_dict_get(context, "title");
-#line 5
+#line 4
     if (tmp)
-#line 5
+#line 4
       onion_response_write_html_safe(res, tmp);
-#line 5
+#line 4
   }
   onion_response_write(res, "</title>\n"
       "  </head>\n"
       "  <body>\n"
       "", 28);
-#line 8
+#line 7
   {
-#line 8
+#line 7
     void (*f)(onion_dict *context, onion_response *res);
-#line 8
+#line 7
     f=(void*)onion_dict_get(context, "__block_content__");
-#line 8
+#line 7
     if (f)
-#line 8
+#line 7
       f(context, res);
-#line 8
+#line 7
   }
   onion_response_write(res, "  \n"
       "  </body>\n"
       "</html>\n"
       "", 21);
-#line 11
+#line 10
   if (!has_context)
-#line 11
+#line 10
     onion_dict_free(context);
 #line 1
 }

BIN
onion/base_html.o


BIN
onion/fortunes_html.o


BIN
onion/hello


+ 1 - 1
onion/hello.c

@@ -190,7 +190,7 @@ onion_connection_status return_fortune(MYSQL *db, onion_request *req, onion_resp
 	int i;
 	for (i=0;i<fortune_list.count;i++){
 		char nr[16];
-		snprintf(nr,sizeof(nr),"%010d",nr);
+		snprintf(nr,sizeof(nr),"%010d",i);
 		
 		onion_dict *fortune=onion_dict_new();
 		onion_dict_add(fortune, "id", fortune_list.list[i].id, 0);

BIN
onion/hello.o


BIN
onion/libonion_static.a


+ 1 - 1
onion/onion

@@ -1 +1 @@
-Subproject commit 91fa116cef62abed5fd4286f58bf426c5c1d1c71
+Subproject commit 2d54da759106847a8d16498aff2f09a740c4ab10