From: Rusty Russell Date: Fri, 15 Aug 2008 00:38:41 +0000 (+1000) Subject: merge X-Git-Url: https://git.ozlabs.org/?p=ccan;a=commitdiff_plain;h=74e9da4d1c0b968fbac4b8da165e6ad5318329dd;hp=36e8b652d0aa045e6e427dc3851da24472ed6a95 merge --- diff --git a/ccan/build_assert/_info.30342 b/ccan/build_assert/_info.30342 new file mode 100755 index 00000000..d1a638f8 Binary files /dev/null and b/ccan/build_assert/_info.30342 differ diff --git a/ccan/build_assert/_info.30850 b/ccan/build_assert/_info.30850 new file mode 100755 index 00000000..d1a638f8 Binary files /dev/null and b/ccan/build_assert/_info.30850 differ diff --git a/ccan/string/test/run-grab.c b/ccan/string/test/run-grab.c index cfd8b9b4..96b9dac8 100644 --- a/ccan/string/test/run-grab.c +++ b/ccan/string/test/run-grab.c @@ -1,6 +1,5 @@ -/* This is test for grab_file() function */ - -/* +/* This is test for grab_file() function + * * Example: * * void *grab_file(const void *ctx, const char *filename) @@ -22,4 +21,34 @@ * } */ +#include +#include +#include +#include +#include "string/string.h" +#include "string/string.c" +#include "tap/tap.h" + +int +main(int argc, char *argv[]) +{ + unsigned int i; + char **split, *str; + int length; + struct stat st; + + str = grab_file(NULL, "ccan/string/test/run-grab.c"); + split = strsplit(NULL, str, "\n", NULL); + length = strlen(split[0]); + ok1(streq(split[0], "/* This is test for grab_file() function")); + for (i = 1; split[i]; i++) + length += strlen(split[i]); + ok1(streq(split[i-1], "/* End of grab_file() test */")); + if (stat("ccan/string/test/run-grab.c", &st) != 0) + err(1, "Could not stat self"); + ok1(st.st_size == length + i); + + return 0; +} + /* End of grab_file() test */ diff --git a/ccan/string/test/run.c b/ccan/string/test/run.c index f68e7ec5..c50854ab 100644 --- a/ccan/string/test/run.c +++ b/ccan/string/test/run.c @@ -27,9 +27,7 @@ int main(int argc, char *argv[]) char **split, *str; void *ctx; char *strings[NUM_SUBSTRINGS * NUM_SUBSTRINGS]; - int length; - struct stat st; - + n = 0; for (i = 0; i < NUM_SUBSTRINGS; i++) { for (j = 0; j < NUM_SUBSTRINGS; j++) { @@ -117,16 +115,5 @@ int main(int argc, char *argv[]) ok1(talloc_parent(str) == ctx); talloc_free(ctx); - str = grab_file(NULL, "ccan/string/test/run-grab.c"); - split = strsplit(NULL, str, "\n", NULL); - length = strlen(split[0]); - ok1(streq(split[0], "/* This is test for grab_file() function */")); - for(i = 1; split[i]; i++) - length += strlen(split[i]); - ok1(streq(split[i-1], "/* End of grab_file() test */")); - if (stat("ccan/string/test/run-grab.c", &st) != 0) - err(1, "Could not stat self"); - ok1(st.st_size == length); - return exit_status(); } diff --git a/tools/create_dep_tar b/tools/create_dep_tar index 7920b0b0..715fb6ba 100755 Binary files a/tools/create_dep_tar and b/tools/create_dep_tar differ diff --git a/tools/create_dep_tar.c b/tools/create_dep_tar.c index 74fdb569..3a84f8d9 100644 --- a/tools/create_dep_tar.c +++ b/tools/create_dep_tar.c @@ -53,7 +53,7 @@ create_tar(char **deps, const char *dir, const char *targetdir) if (deps != NULL) { cmd_args = strjoin(NULL, deps, " "); - cmd = talloc_asprintf(NULL, TAR_CMD "%s/%s_dependencies.tar %s %s", targetdir, module, cmd_args, dir); + cmd = talloc_asprintf(NULL, TAR_CMD "%s/%s_with_deps.tar %s %s", targetdir, module, cmd_args, dir); } else cmd = talloc_asprintf(NULL, TAR_CMD "%s/%s.tar %s", targetdir, module, dir); diff --git a/web/configuration b/web/configuration index d29bed87..fcb38358 100644 --- a/web/configuration +++ b/web/configuration @@ -29,9 +29,6 @@ $temprepo = "temprepo/"; //email from $frommail = "ccan@ozlabs.org"; -//email for admins -$ccan_admin = "g.dinesh.cse@gmail.com"; - //ccan home $ccan_home_dir = "ccan/"; @@ -43,4 +40,4 @@ $bzr_push = 'bzr push /home/dinesh/testwebsite/ '; //tar home dir $tar_dir = 'tarball/'; -?> \ No newline at end of file +?> diff --git a/web/db/ccan.db b/web/db/ccan.db index 77ba6a01..503c7fcc 100755 Binary files a/web/db/ccan.db and b/web/db/ccan.db differ diff --git a/web/dispmoduleinfo.php b/web/dispmoduleinfo.php index b0aba20e..9c26f9ea 100644 --- a/web/dispmoduleinfo.php +++ b/web/dispmoduleinfo.php @@ -19,7 +19,7 @@ $row = sqlite3_fetch_array($result); Download Dependencies'; + echo 'Download Dependencies'; ?> @@ -54,4 +54,4 @@ function checkerror($status, $msg) exit(); } } -?> \ No newline at end of file +?> diff --git a/web/functions.php b/web/functions.php index 4228c3ae..4b89fa5a 100644 --- a/web/functions.php +++ b/web/functions.php @@ -36,7 +36,7 @@ function getccanadmin($db) $result = sqlite3_query($handle, $query) or die("Error in query: ".sqlite3_error($handle)); while ($row = sqlite3_fetch_array($result)) - $admin = $admin.$row[0].","; + $admin = $admin.$row['email'].","; return $admin; } -?> \ No newline at end of file +?> diff --git a/web/requestid.php b/web/requestid.php index eedada53..3d293ddd 100644 --- a/web/requestid.php +++ b/web/requestid.php @@ -3,6 +3,7 @@ session_start(); include('logo.html'); include('menulist.html'); include('configuration'); +include('functions.php'); if(isset($_POST['submit'])) { $name = $_REQUEST['name']; @@ -80,7 +81,7 @@ $result = sqlite3_exec($handle, $query) or die("Error in query: ".sqlite3_error( $subject = "Approval of ccan account"; $message = "There is new request for ccan account id.\n\n Please use the following link to approve http://ccan.ozlabs.org/dinesh/approval.php?accountid=".$accountid; -mail($ccan_admin, $subject, $message, "From: $email"); +mail(getccanadmin($db), $subject, $message, "From: $email"); ?>
Thank you for registering with CCAN. You will get the password to your mail after approval.