Update of /cvsroot/monetdb/sql/src/backends/monet5/merovingian
In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv22168

Modified Files:
        merovingian_controlrunner.c monetdb_set.c 
Log Message:
move tag format check to merovingian in anticipation for when we allow others 
to communicate with merovingian too

U merovingian_controlrunner.c
Index: merovingian_controlrunner.c
===================================================================
RCS file: 
/cvsroot/monetdb/sql/src/backends/monet5/merovingian/merovingian_controlrunner.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- merovingian_controlrunner.c 9 Sep 2009 09:50:41 -0000       1.4
+++ merovingian_controlrunner.c 9 Sep 2009 11:03:18 -0000       1.5
@@ -199,6 +199,7 @@
                                        sabdb *topdb;
                                        err e;
                                        confkeyval *kv, *props = 
getDefaultProps();
+                                       char *value;
 
                                        kv = findConfKey(_mero_props, "shared");
                                        if (strcmp(kv->val, "no") == 0) {
@@ -222,6 +223,32 @@
                                                continue;
                                        }
 
+                                       /* check if tag matches [A-Za-z0-9./]+ 
*/
+                                       p += strlen("share=");
+                                       value = p;
+                                       while (*value != '\0') {
+                                               if (!(
+                                                                       (*value 
>= 'A' && *value <= 'Z') ||
+                                                                       (*value 
>= 'a' && *value <= 'z') ||
+                                                                       (*value 
>= '0' && *value <= '9') ||
+                                                                       (*value 
== '.' || *value == '/')
+                                                        ))
+                                               {
+                                                       len = snprintf(buf2, 
sizeof(buf2),
+                                                                       
"invalid character '%c' at %d "
+                                                                       "in tag 
name '%s'\n",
+                                                                       *value, 
(int)(value - p), p);
+                                                       send(msgsock, buf2, 
len, 0);
+                                                       buf2[len] = '\0';
+                                                       Mfprintf(stderr, "set: 
%s\n", buf2);
+                                                       value = NULL;
+                                                       continue;
+                                               }
+                                               value++;
+                                       }
+                                       if (value == NULL)
+                                               continue;
+
                                        topdb = stats;
                                        while (stats != NULL) {
                                                if (strcmp(q, stats->dbname) == 
0) {
@@ -234,7 +261,6 @@
                                                                                
stats->dbname, _mero_hostname, _mero_port);
                                                                broadcast(buf2);
                                                        }
-                                                       p += strlen("share=");
                                                        if (kv->val != NULL) {
                                                                
GDKfree(kv->val);
                                                                kv->val = NULL;

U monetdb_set.c
Index: monetdb_set.c
===================================================================
RCS file: /cvsroot/monetdb/sql/src/backends/monet5/merovingian/monetdb_set.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- monetdb_set.c       4 Sep 2009 12:38:46 -0000       1.3
+++ monetdb_set.c       9 Sep 2009 11:03:18 -0000       1.4
@@ -92,22 +92,6 @@
                        property[0] = '\0';
                } else {
                        argv[1] = value;
-                       /* check if tag matches [A-Za-z0-9./]+ */
-                       while (*value != '\0') {
-                               if (!(
-                                               (*value >= 'A' && *value <= 
'Z') ||
-                                               (*value >= 'a' && *value <= 
'z') ||
-                                               (*value >= '0' && *value <= 
'9') ||
-                                               (*value == '.' || *value == '/')
-                                  ))
-                               {
-                                       fprintf(stderr, "set: invalid character 
'%c' at %d "
-                                                       "in tag name '%s'\n",
-                                                       *value, (int)(value - 
argv[1]), argv[1]);
-                                       exit(1);
-                               }
-                               value++;
-                       }
                }
                return(command_merocom(argc, &argv[0], SHARE));
        }


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Monetdb-sql-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-sql-checkins

Reply via email to