Fixed bug that failed to detect possible changes in home/path environmental variables.

--- main/yas.c
+++ main/yas.c
@@ -213,7 +213,7 @@
 	char *newHomeEnv = getenv("HOME");
 	char *newPathEnv = getenv("PATH");

-	if(strcmp(newHomeEnv, homeDir)) {
+	if(!strcmp(newHomeEnv, homeDir)) {
 		free(homeDir);
 		homeDir = newHomeEnv;

@@ -225,7 +225,7 @@
 		newPath = 1;
 	}

-	if(strcmp(newPathEnv, path)) {
+	if(!strcmp(newPathEnv, path)) {
 		free(path);
 		path = newPathEnv;
 		parsePath();


Removed signature for unused function.

Removed signature for unused function.

--- History.h
+++ History.h
@@ -31,7 +31,7 @@
 #define HISTORY_H

 #ifndef lint
-static const char cvs_HISTORY_H[] = "$Id: History.h,v 1.9 2002/04/08 14:54:30 phelps Exp $";
+static const char cvs_HISTORY_H[] = "$Id: History.h,v 1.10 2002/04/12 13:21:53 phelps Exp $";
 #endif /* lint */

@@ -174,9 +174,6 @@
 /* Kills the thread of the given message */
 void HistoryKillThread(Widget widget, message_t message);

-/* Returns whether or not a given message is in a killed thread */
-Boolean HistoryIsMessageKilled(Widget widget, message_t message);
-
 /* Selects a message in the history */
 void HistorySelect(Widget widget, message_t message);


Make the txtinfo plugin work on Wn32

Make the txtinfo plugin work on Wn32

--- lib/txtinfo/src/olsrd_txtinfo.c
+++ lib/txtinfo/src/olsrd_txtinfo.c
@@ -64,7 +64,19 @@
 #include <fcntl.h>

 #ifdef WIN32
+#undef EWOULDBLOCK
+#undef EAGAIN
+#define EWOULDBLOCK WSAEWOULDBLOCK
+#define EAGAIN WSAEWOULDBLOCK
+#undef errno
+#define errno WSAGetLastError()
+#undef SHUT_WR
+#define SHUT_WR SD_SEND
+#undef strerror
+#define strerror(x) StrError(x)
 #define close(x) closesocket(x)
+#define read(fd,buf,size) recv((fd), (buf), (size), 0)
+#define write(fd,buf,size) send((fd), (buf), (size), 0)
 #endif

@@ -234,6 +246,15 @@
 static int set_nonblocking(int fd)
 {
     /* make the fd non-blocking */
+#ifdef WIN32
+    unsigned long flags = 1;
+    if (ioctlsocket(fd, FIONBIO, &flags) != 0) {
+        const long int save_errno = errno;
+        olsr_printf(0, "(TXTINFO) ioctlsocket()=%ld/%s\n", save_errno, strerror(save_errno));
+        olsr_syslog(OLSR_LOG_ERR, "(TXTINFO) Cannot set the socket flags: %s", strerror(save_errno));
+        return -1;
+    }
+#else
     int socket_flags = fcntl(fd, F_GETFL);
     if (socket_flags < 0) {
         olsr_syslog(OLSR_LOG_ERR, "(TXTINFO) Cannot get the socket flags: %s", strerror(errno));
@@ -243,9 +264,10 @@
         olsr_syslog(OLSR_LOG_ERR, "(TXTINFO) Cannot set the socket flags: %s", strerror(errno));
         return -1;
     }
+#endif
     return 0;
-
-}
+}
+
 static void ipc_action(int fd, void *data __attribute__((unused)), unsigned int flags __attribute__((unused)))
 {
     struct ipc_conn *conn;


Update tlshelloworld.c

Update tlshelloworld.c

--- examples/tlshelloworld.c
+++ examples/tlshelloworld.c
@@ -115,51 +115,54 @@
         while ((read_size = recv(client_sock, client_message, 0xFFFFF , 0)) > 0) {
             if (tls_consume_stream(context, client_message, read_size, NULL) > 0)
                 break;
-            //if (!tls_pending(context))
-            //    break;
         }
         send_pending(client_sock, context);
-        fprintf(stderr, "USED CIPHER: %s\n", tls_cipher_name(context));
-        int ref_packet_count = 0;
-        int res;
-        while ((read_size = recv(client_sock, client_message, 0xFFFF , 0)) > 0) {
-            tls_consume_stream(context, client_message, read_size, NULL);
-            send_pending(client_sock, context);
-            if (tls_established(context)) {
-                unsigned char read_buffer[0xFFFF];
-                int read_size = tls_read(context, read_buffer, 0xFFFF - 1);
-                if (read_size > 0) {
-                    read_buffer[read_size] = 0;
-                    unsigned char export_buffer[0xFFF];
-                    // simulate serialization / deserialization to another process
-                    char sni[0xFF];
-                    sni[0] = 0;
-                    if (context->sni)
-                        snprintf(sni, 0xFF, "%s", context->sni);
-/* COOL STUFF => */ int size = tls_export_context(context, export_buffer, sizeof(export_buffer));
-                    if (size > 0) {
-/* COOLER STUFF => */   TLSContext *imported_context = tls_import_context(export_buffer, size);
-// This is cool because a context can be sent to an existing process.
-// It will work both with fork and with already existing worker process.
-                        fprintf(stderr, "Imported context (size: %i): %x\n", size, imported_context);
-                        if (imported_context) {
-                            // destroy old context
-                            tls_destroy_context(context);
-                            // simulate serialization/deserialization of context
-                            context = imported_context;
+        if (read_size > 0) {
+            fprintf(stderr, "USED CIPHER: %s\n", tls_cipher_name(context));
+            int ref_packet_count = 0;
+            int res;
+            while ((read_size = recv(client_sock, client_message, 0xFFFF , 0)) > 0) {
+                if (tls_consume_stream(context, client_message, read_size, NULL) < 0) {
+                    fprintf(stderr, "Error in stream consume\n");
+                    break;
+                }
+                send_pending(client_sock, context);
+                if (tls_established(context) == 1) {
+                    unsigned char read_buffer[0xFFFF];
+                    int read_size = tls_read(context, read_buffer, 0xFFFF - 1);
+                    if (read_size > 0) {
+                        read_buffer[read_size] = 0;
+                        unsigned char export_buffer[0xFFF];
+                        // simulate serialization / deserialization to another process
+                        char sni[0xFF];
+                        sni[0] = 0;
+                        if (context->sni)
+                            snprintf(sni, 0xFF, "%s", context->sni);
+    /* COOL STUFF => */ int size = tls_export_context(context, export_buffer, sizeof(export_buffer));
+                        if (size > 0) {
+    /* COOLER STUFF => */   TLSContext *imported_context = tls_import_context(export_buffer, size);
+    // This is cool because a context can be sent to an existing process.
+    // It will work both with fork and with already existing worker process.
+                            fprintf(stderr, "Imported context (size: %i): %x\n", size, imported_context);
+                            if (imported_context) {
+                                // destroy old context
+                                tls_destroy_context(context);
+                                // simulate serialization/deserialization of context
+                                context = imported_context;
+                            }
                         }
+                        // ugly inefficient code ... don't write like me
+                        char send_buffer[0xF000];
+                        char send_buffer_with_header[0xF000];
+                        char out_buffer[0xFFF];
+                        snprintf(send_buffer, sizeof(send_buffer), "Hello world from TLS 1.2 (used chipher is: %s), SNI: %s\r\n\r\nCertificate: %s\r\n\r\nBelow is the received header:\r\n%s\r\nAnd the source code for this example: \r\n\r\n%s", tls_cipher_name(context), sni, tls_certificate_to_string(server_context->certificates[0], out_buffer, 0xFFF), read_buffer, source_buf);
+                        int content_length = strlen(send_buffer);
+                        snprintf(send_buffer_with_header, sizeof(send_buffer), "HTTP/1.1 200 OK\r\nConnection: close\r\nContent-type: text/plain\r\nContent-length: %i\r\n\r\n%s", content_length, send_buffer);
+                        tls_write(context, send_buffer_with_header, strlen(send_buffer_with_header));
+                        tls_close_notify(context);
+                        send_pending(client_sock, context);
+                        break;
                     }
-                    // ugly inefficient code ... don't write like me
-                    char send_buffer[0xF000];
-                    char send_buffer_with_header[0xF000];
-                    char out_buffer[0xFFF];
-                    snprintf(send_buffer, sizeof(send_buffer), "Hello world from TLS 1.2 (used chipher is: %s), SNI: %s\r\n\r\nCertificate: %s\r\n\r\nBelow is the received header:\r\n%s\r\nAnd the source code for this example: \r\n\r\n%s", tls_cipher_name(context), sni, tls_certificate_to_string(server_context->certificates[0], out_buffer, 0xFFF), read_buffer, source_buf);
-                    int content_length = strlen(send_buffer);
-                    snprintf(send_buffer_with_header, sizeof(send_buffer), "HTTP/1.1 200 OK\r\nConnection: close\r\nContent-type: text/plain\r\nContent-length: %i\r\n\r\n%s", content_length, send_buffer);
-                    tls_write(context, send_buffer_with_header, strlen(send_buffer_with_header));
-                    tls_close_notify(context);
-                    send_pending(client_sock, context);
-                    break;
                 }
             }
         }


fts: Fixed checking settings compatibility with non-INBOX namespaces.

--- src/plugins/fts/fts-api.c
+++ src/plugins/fts/fts-api.c
@@ -4,6 +4,7 @@
 #include "array.h"
 #include "hex-binary.h"
 #include "mail-index.h"
+#include "mail-namespace.h"
 #include "mail-storage-private.h"
 #include "mail-search.h"
 #include "../virtual/virtual-storage.h"
@@ -162,6 +163,8 @@
 				      const struct fts_backend_build_key *key)
 {
 	fts_backend_set_cur_mailbox(ctx);
+
+	i_assert(ctx->cur_box != NULL);

 	if (!ctx->backend->v.update_set_build_key(ctx, key))
 		return FALSE;
@@ -378,11 +381,23 @@
 int fts_index_have_compatible_settings(struct mailbox_list *list,
 				       uint32_t checksum)
 {
+	struct mail_namespace *ns = mailbox_list_get_namespace(list);
 	struct mailbox *box;
 	struct fts_index_header hdr;
+	const char *vname;
+	unsigned int len;
 	int ret;

-	box = mailbox_alloc(list, "INBOX", 0);
+	if ((ns->flags & NAMESPACE_FLAG_INBOX_USER) != 0)
+		vname = "INBOX";
+	else {
+		len = strlen(ns->prefix);
+		if (len > 0 && ns->prefix[len-1] == mail_namespace_get_sep(ns))
+			len--;
+		vname = t_strndup(ns->prefix, len);
+	}
+
+	box = mailbox_alloc(list, vname, 0);
 	if (mailbox_sync(box, (enum mailbox_sync_flags)0) < 0) {
 		i_error("lucene: Failed to sync mailbox INBOX: %s",
 			mailbox_get_last_error(box, NULL));


src/pmdumplog/pmdumplog.c: changes to handle compressed archives

In a few places (mostly to do with dumping and checking the temporal
index), replace stat() with __pmStat().

--- src/pmdumplog/pmdumplog.c
+++ src/pmdumplog/pmdumplog.c
@@ -748,18 +748,18 @@
 	printf("\t  %5d  %11d  %11d\n", tip->ti_vol, tip->ti_meta, tip->ti_log);
 	if (i == 0) {
 	    pmsprintf(path, sizeof(path), "%s.meta", lcp->l_name);
-	    if (stat(path, &sbuf) == 0)
+	    if (__pmStat(path, &sbuf) == 0)
 		meta_size = sbuf.st_size;
 	    else
 		meta_size = -1;
 	}
 	if (lastp == NULL || tip->ti_vol != lastp->ti_vol) {
 	    pmsprintf(path, sizeof(path), "%s.%d", lcp->l_name, tip->ti_vol);
-	    if (stat(path, &sbuf) == 0)
+	    if (__pmStat(path, &sbuf) == 0)
 		log_size = sbuf.st_size;
 	    else {
 		log_size = -1;
-		printf("\t\tWarning: file missing or compressed for log volume %d\n", tip->ti_vol);
+		printf("\t\tWarning: file missing for log volume %d\n", tip->ti_vol);
 	    }
 	}
 	/*
@@ -926,7 +926,7 @@
 	return 0;

     /* No not allow a directory */
-    if (stat(name, &sbuf) != 0)
+    if (__pmStat(name, &sbuf) != 0)
 	return 1; /* Let pmNewContext(1) issue the error */

     if (S_ISDIR(sbuf.st_mode))


Create E_2.3-5.c

Create E_2.3-5.c

error: pathspec 'Chapter02/E_2.3-5.c' did not match any file(s) known to git


Create E_7.4-5.c

Create E_7.4-5.c

error: pathspec 'Chapter07/E_7.4-5.c' did not match any file(s) known to git

--- Chapter07/E_7.4-5.c
+++ Chapter07/E_7.4-5.c
@@ -0,0 +1,91 @@
+/**************************************************************
+ * Copyright (c) Wuzhiyi
+ * Introduction to Algorithms
+ *
+ * 题目:  Exercise 7.4-5
+ * 名称:  MODIFIED-QUICKSORT
+ * 作者:  skanev
+ * 语言: c
+ * 内容摘要: 底层插入排序，上层快速排序
+ *
+ * 修改记录:
+ * 修改日期       版本号       修改人       修改内容
+ * ------------------------------------------------------------
+ * 20150708       V1.0          wuzhiyi      创建
+ **************************************************************/
+
+/* C runner output
+ * n=400000, k=550
+ * -------------------------
+ * quicksort          =0.332485
+ * modified-quicksort =0.031952
+ */
+
+#define K 550
+
+int partition(int[], int, int);
+void limited_quicksort(int[], int, int, int);
+void insertion_sort(int[], int, int);
+
+void quicksort(int A[], int p, int r)
+{
+    if (p<r-1)
+    {
+        int q=partition(A,p,r);
+        quicksort(A,p,q);
+        quicksort(A,q+1,r);
+    }
+}
+
+void modified_quicksort(int A[], int p, int r)
+{
+    limited_quicksort(A,p,r,K);
+    insertion_sort(A,p,r);
+}
+
+void limited_quicksort(int A[], int p, int r, int treshold)
+{
+    if (r-p>treshold)
+    {
+        int q=partition(A,p,r);
+        limited_quicksort(A,p,q,treshold);
+        limited_quicksort(A,q+1,r,treshold);
+    }
+}
+
+int partition(int A[], int p, int r)
+{
+    int x,i,j,tmp;
+
+    x=A[r-1];
+    i=p;
+
+    for (j=p; j<r-1; j++) {
+        if (A[j]<=x) {
+            tmp=A[i];
+            A[i]=A[j];
+            A[j]=tmp;
+            i++;
+        }
+    }
+
+    tmp=A[i];
+    A[i]=A[r-1];
+    A[r-1]=tmp;
+
+    return i;
+}
+
+void insertion_sort(int A[], int p, int r)
+{
+    int i,j,key;
+
+    for (j=p+1; j<r; j++)
+    {
+        key=A[j];
+        for (i=j-1; i>=p && A[i]>key; i--) {
+            A[i+1]=A[i];
+        }
+        A[i+1]=key;
+    }
+}


BUG#24566 - Incorrect key file for table ( the size of table is more than 2G)
Accessing a file that is bigger than 2G may report that read/write operation
failed. This may affect anything that uses my_pread/my_pwrite functions, e.g.
MyISAM, ARCHIVE, binary log.

For MyISAM INSERT may report that table is crashed when writing to a table
that is bigger than 2G.

This is fixed by using proper offset type in my_pread/my_pwrite functions on
systems that do not have native pread/pwrite calls.

Affects systems that do not have native pread/pwrite calls, e.g. Windows.

No test case for this fix, since it requires huge table.

mysys/my_pread.c:
  Use proper offset type for restoring position on systems that do not have native
  pread/pwrite calls.

--- mysys/my_pread.c
+++ mysys/my_pread.c
@@ -37,7 +37,7 @@
     errno=0;					/* Linux doesn't reset this */
 #endif
 #ifndef HAVE_PREAD
-    off_t old_offset;
+    os_off_t old_offset;

     pthread_mutex_lock(&my_file_info[Filedes].mutex);
     /*
@@ -45,7 +45,7 @@
       before seeking to the given offset
     */

-    error= (old_offset= (off_t)lseek(Filedes, 0L, MY_SEEK_CUR)) == -1L ||
+    error= (old_offset= lseek(Filedes, 0L, MY_SEEK_CUR)) == -1L ||
            lseek(Filedes, offset, MY_SEEK_SET) == -1L;

     if (!error)                                 /* Seek was successful */
@@ -116,7 +116,7 @@
   {
 #ifndef HAVE_PREAD
     int error= 0;
-    off_t old_offset;
+    os_off_t old_offset;
     writenbytes= (uint) -1;
     pthread_mutex_lock(&my_file_info[Filedes].mutex);

@@ -124,7 +124,7 @@
       As we cannot change the file pointer, we save the old position,
       before seeking to the given offset
     */
-    error= ((old_offset= (off_t)lseek(Filedes, 0L, MY_SEEK_CUR)) == -1L ||
+    error= ((old_offset= lseek(Filedes, 0L, MY_SEEK_CUR)) == -1L ||
             lseek(Filedes, offset, MY_SEEK_SET) == -1L);

     if (!error)                                 /* Seek was successful */


remove unnecessary local variables

remove unnecessary local variables

--- lib/mousemove.c
+++ lib/mousemove.c
@@ -131,11 +131,9 @@
                    float lookX, float lookY, float lookZ,
                    float upX, float upY, float upZ)
 {
-	float pos[3],look[3],up[3];
-	vec3f_set(pos, posX, posY, posZ);
-	vec3f_set(look, lookX, lookY, lookZ);
-	vec3f_set(up, upX, upY, upZ);
-	mousemove_setVec(pos, look, up);
+	vec3f_set(cam_position, posX, posY, posZ);
+	vec3f_set(cam_lookat, lookX, lookY, lookZ);
+	vec3f_set(cam_up, upX, upY, upZ);
 }

 /** Creates a rotation matrix and multiplies a point by the rotation


android/ipc-tester: Add cases for HIDHOST msg size

Add cases testing message size verification for HIDHOST opcodes.

--- android/ipc-tester.c
+++ android/ipc-tester.c
@@ -882,5 +882,79 @@
 			sizeof(struct hal_cmd_sock_connect), -1,
 			HAL_SERVICE_ID_BLUETOOTH, HAL_SERVICE_ID_SOCK);

+	/* check for valid data size for HID Host */
+	test_datasize_valid("HIDHOST Connect+", HAL_SERVICE_ID_HIDHOST,
+			HAL_OP_HIDHOST_CONNECT,
+			sizeof(struct hal_cmd_hidhost_connect), 1,
+			HAL_SERVICE_ID_BLUETOOTH, HAL_SERVICE_ID_HIDHOST);
+	test_datasize_valid("HIDHOST Connect-", HAL_SERVICE_ID_HIDHOST,
+			HAL_OP_HIDHOST_CONNECT,
+			sizeof(struct hal_cmd_hidhost_connect), -1,
+			HAL_SERVICE_ID_BLUETOOTH, HAL_SERVICE_ID_HIDHOST);
+	test_datasize_valid("HIDHOST Disconnect+", HAL_SERVICE_ID_HIDHOST,
+			HAL_OP_HIDHOST_DISCONNECT,
+			sizeof(struct hal_cmd_hidhost_disconnect), 1,
+			HAL_SERVICE_ID_BLUETOOTH, HAL_SERVICE_ID_HIDHOST);
+	test_datasize_valid("HIDHOST Disconnect-", HAL_SERVICE_ID_HIDHOST,
+			HAL_OP_HIDHOST_DISCONNECT,
+			sizeof(struct hal_cmd_hidhost_disconnect), -1,
+			HAL_SERVICE_ID_BLUETOOTH, HAL_SERVICE_ID_HIDHOST);
+	test_datasize_valid("HIDHOST Virt. Unplug+", HAL_SERVICE_ID_HIDHOST,
+			HAL_OP_HIDHOST_VIRTUAL_UNPLUG,
+			sizeof(struct hal_cmd_hidhost_virtual_unplug), 1,
+			HAL_SERVICE_ID_BLUETOOTH, HAL_SERVICE_ID_HIDHOST);
+	test_datasize_valid("HIDHOST Virt. Unplug-", HAL_SERVICE_ID_HIDHOST,
+			HAL_OP_HIDHOST_VIRTUAL_UNPLUG,
+			sizeof(struct hal_cmd_hidhost_virtual_unplug), -1,
+			HAL_SERVICE_ID_BLUETOOTH, HAL_SERVICE_ID_HIDHOST);
+	test_datasize_valid("HIDHOST Set Info+", HAL_SERVICE_ID_HIDHOST,
+			HAL_OP_HIDHOST_SET_INFO,
+			sizeof(struct hal_cmd_hidhost_set_info), 1,
+			HAL_SERVICE_ID_BLUETOOTH, HAL_SERVICE_ID_HIDHOST);
+	test_datasize_valid("HIDHOST Set Info-", HAL_SERVICE_ID_HIDHOST,
+			HAL_OP_HIDHOST_SET_INFO,
+			sizeof(struct hal_cmd_hidhost_set_info), -1,
+			HAL_SERVICE_ID_BLUETOOTH, HAL_SERVICE_ID_HIDHOST);
+	test_datasize_valid("HIDHOST Get Protocol+", HAL_SERVICE_ID_HIDHOST,
+			HAL_OP_HIDHOST_GET_PROTOCOL,
+			sizeof(struct hal_cmd_hidhost_get_protocol), 1,
+			HAL_SERVICE_ID_BLUETOOTH, HAL_SERVICE_ID_HIDHOST);
+	test_datasize_valid("HIDHOST Get Protocol-", HAL_SERVICE_ID_HIDHOST,
+			HAL_OP_HIDHOST_GET_PROTOCOL,
+			sizeof(struct hal_cmd_hidhost_get_protocol), -1,
+			HAL_SERVICE_ID_BLUETOOTH, HAL_SERVICE_ID_HIDHOST);
+	test_datasize_valid("HIDHOST Set Protocol+", HAL_SERVICE_ID_HIDHOST,
+			HAL_OP_HIDHOST_SET_PROTOCOL,
+			sizeof(struct hal_cmd_hidhost_set_protocol), 1,
+			HAL_SERVICE_ID_BLUETOOTH, HAL_SERVICE_ID_HIDHOST);
+	test_datasize_valid("HIDHOST Set Protocol-", HAL_SERVICE_ID_HIDHOST,
+			HAL_OP_HIDHOST_SET_PROTOCOL,
+			sizeof(struct hal_cmd_hidhost_set_protocol), -1,
+			HAL_SERVICE_ID_BLUETOOTH, HAL_SERVICE_ID_HIDHOST);
+	test_datasize_valid("HIDHOST Get Report+", HAL_SERVICE_ID_HIDHOST,
+			HAL_OP_HIDHOST_GET_REPORT,
+			sizeof(struct hal_cmd_hidhost_get_report), 1,
+			HAL_SERVICE_ID_BLUETOOTH, HAL_SERVICE_ID_HIDHOST);
+	test_datasize_valid("HIDHOST Get Report-", HAL_SERVICE_ID_HIDHOST,
+			HAL_OP_HIDHOST_GET_REPORT,
+			sizeof(struct hal_cmd_hidhost_get_report), -1,
+			HAL_SERVICE_ID_BLUETOOTH, HAL_SERVICE_ID_HIDHOST);
+	test_datasize_valid("HIDHOST Set Report+", HAL_SERVICE_ID_HIDHOST,
+			HAL_OP_HIDHOST_SET_REPORT,
+			sizeof(struct hal_cmd_hidhost_set_report), 1,
+			HAL_SERVICE_ID_BLUETOOTH, HAL_SERVICE_ID_HIDHOST);
+	test_datasize_valid("HIDHOST Set Report-", HAL_SERVICE_ID_HIDHOST,
+			HAL_OP_HIDHOST_SET_REPORT,
+			sizeof(struct hal_cmd_hidhost_set_report), -1,
+			HAL_SERVICE_ID_BLUETOOTH, HAL_SERVICE_ID_HIDHOST);
+	test_datasize_valid("HIDHOST Send Data+", HAL_SERVICE_ID_HIDHOST,
+			HAL_OP_HIDHOST_SEND_DATA,
+			sizeof(struct hal_cmd_hidhost_send_data), 1,
+			HAL_SERVICE_ID_BLUETOOTH, HAL_SERVICE_ID_HIDHOST);
+	test_datasize_valid("HIDHOST Send Data-", HAL_SERVICE_ID_HIDHOST,
+			HAL_OP_HIDHOST_SEND_DATA,
+			sizeof(struct hal_cmd_hidhost_send_data), -1,
+			HAL_SERVICE_ID_BLUETOOTH, HAL_SERVICE_ID_HIDHOST);
+
 	return tester_run();
 }


dedede: Add board_vbus_presence_change()

Dedede doesn't have a dedicated interrupt for ACOK, however we can use
the charger or TCPC to inform us when AC is OK through other means.
This commit uses the board_vbus_presence_change() trigger to trigger
the HOOK_AC_CHANGE hook.

BUG=b:154113446,b:154113465
BRANCH=None
TEST=Build and flash waddledoo, plug in AC, verify that "AC on" prints
are seen. Unplug AC, verify that "AC off" prints are seen.

Signed-off-by: Aseda Aboagye <12c9b286316a940fd31c24070da5ab64cdd4d0e7@google.com>
Change-Id: I1621135499bb65d13aef4f7fec76bd366def3bdc
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2159942
Tested-by: Aseda Aboagye <12c9b286316a940fd31c24070da5ab64cdd4d0e7@chromium.org>
Reviewed-by: Diana Z <cb2016afc7183e5356c690dc63b4ba817470501a@chromium.org>
Commit-Queue: Aseda Aboagye <12c9b286316a940fd31c24070da5ab64cdd4d0e7@chromium.org>

--- baseboard/dedede/baseboard.c
+++ baseboard/dedede/baseboard.c
@@ -9,8 +9,10 @@
 #include "board_config.h"
 #include "chipset.h"
 #include "common.h"
+#include "extpower.h"
 #include "gpio.h"
 #include "hooks.h"
+#include "host_command.h"
 #include "intel_x86.h"

 /******************************************************************************/
@@ -94,6 +96,28 @@
 	gpio_set_flags(GPIO_PG_PP1050_ST_OD, flags);
 }

+/*
+ * Dedede does not have a GPIO indicating ACOK, therefore the charger or TCPC
+ * can call this function once it detects a VBUS presence change with which we
+ * can trigger the HOOK_AC_CHANGE hook.
+ */
+__override void board_vbus_present_change(void)
+{
+	static int last_extpower_present;
+	int extpower_present = extpower_is_present();
+
+	if (last_extpower_present ^ extpower_present) {
+		hook_notify(HOOK_AC_CHANGE);
+
+		if (extpower_present)
+			host_set_single_event(EC_HOST_EVENT_AC_CONNECTED);
+		else
+			host_set_single_event(EC_HOST_EVENT_AC_DISCONNECTED);
+	}
+
+	last_extpower_present = extpower_present;
+}
+
 uint32_t pp3300_a_pgood;
 __override int intel_x86_get_pg_ec_dsw_pwrok(void)
 {


Removing duplicate line

Removing duplicate line

--- MID/MID.h
+++ MID/MID.h
@@ -163,7 +163,6 @@
 // Stereo input to pin [pot] 6 (through  RELAY to stereo remote control)
 //                     [pot] 5 NC
 // SPI map
-// 51 MOSI
 // 50 MISO
 // 51 MOSI
 // 52 SCK


vp8cx_set_ref: Flush encoder.

vp8cx_set_ref: Flush encoder.

According to the current API spec we need to call vpx_codec_encode() until
vpx_codec_get_cx_data() returns NULL.

Change-Id: Ide0c531dc0d453df8ec1edb8acb894856d6cc22e

--- examples/vp8cx_set_ref.c
+++ examples/vp8cx_set_ref.c
@@ -65,10 +65,11 @@
   exit(EXIT_FAILURE);
 }

-static void encode_frame(vpx_codec_ctx_t *codec,
-                         vpx_image_t *img,
-                         int frame_index,
-                         VpxVideoWriter *writer) {
+static int encode_frame(vpx_codec_ctx_t *codec,
+                        vpx_image_t *img,
+                        int frame_index,
+                        VpxVideoWriter *writer) {
+  int got_pkts = 0;
   vpx_codec_iter_t iter = NULL;
   const vpx_codec_cx_pkt_t *pkt = NULL;
   const vpx_codec_err_t res = vpx_codec_encode(codec, img, frame_index, 1, 0,
@@ -77,6 +78,8 @@
     die_codec(codec, "Failed to encode frame");

   while ((pkt = vpx_codec_get_cx_data(codec, &iter)) != NULL) {
+    got_pkts = 1;
+
     if (pkt->kind == VPX_CODEC_CX_FRAME_PKT) {
       const int keyframe = (pkt->data.frame.flags & VPX_FRAME_IS_KEY) != 0;
       if (!vpx_video_writer_write_frame(writer,
@@ -90,6 +93,8 @@
       fflush(stdout);
     }
   }
+
+  return got_pkts;
 }

 int main(int argc, char **argv) {
@@ -160,6 +165,7 @@
   if (vpx_codec_enc_init(&codec, encoder->codec_interface(), &cfg, 0))
     die_codec(&codec, "Failed to initialize encoder");

+  // Encode frames.
   while (vpx_img_read(&raw, infile)) {
     if (frame_count + 1 == update_frame_num) {
       vpx_ref_frame_t ref;
@@ -171,7 +177,9 @@

     encode_frame(&codec, &raw, frame_count++, writer);
   }
-  encode_frame(&codec, NULL, -1, writer);
+
+  // Flush encoder.
+  while (encode_frame(&codec, NULL, -1, writer)) {};

   printf("\n");
   fclose(infile);


Rename: src/_UPT_destroy.c -> src/ptrace/_UPT_destroy.c

(Logical change 1.162)

--- src/ptrace/_UPT_destroy.c
+++ src/ptrace/_UPT_destroy.c
@@ -0,0 +1,32 @@
+/* libunwind - a platform-independent unwind library
+   Copyright (C) 2003 Hewlett-Packard Co
+	Contributed by David Mosberger-Tang <davidm@hpl.hp.com>
+
+This file is part of libunwind.
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.  */
+
+#include "_UPT_internal.h"
+
+void
+_UPT_destroy (void *ui)
+{
+  free (ui);
+}


Create Queue.c

Create Queue.c

error: pathspec 'April-4th-2016/polishCalculator/Queue.c' did not match any file(s) known to git

--- April-4th-2016/polishCalculator/Queue.c
+++ April-4th-2016/polishCalculator/Queue.c
@@ -0,0 +1,113 @@
+#include <string.h>
+#include <errno.h>
+
+#include "Queue.h"
+
+#define QUEUE_INIT_CAPACITY 4
+
+static int QueueEnsureCapacity(struct Queue* self, size_t minCapacity);
+
+int QueueNew(struct Queue* self, size_t itemSize) {
+    if (!self || itemSize < 1) {
+        errno = EINVAL;
+        return EINVAL;
+    }
+
+    self->_items = calloc(QUEUE_INIT_CAPACITY, itemSize);
+    if (!self->_items) {
+        errno = ENOMEM;
+        return ENOMEM;
+    }
+
+    self->_itemSize = itemSize;
+    self->_count = 0;
+    self->_capacity = QUEUE_INIT_CAPACITY;
+    self->_headIndex = 0;
+    self->_tailIndex = 0;
+
+    return 0;
+}
+
+void QueueDispose(struct Queue* self) {
+
+    if (!self) return;
+
+    free(self->_items);
+    self->_items = NULL;
+}
+
+int QueueEnqueue(struct Queue* self, const void* item) {
+    if (!self || !item) {
+        errno = EINVAL;
+        return EINVAL;
+    }
+    int errorCode = 0;
+    errorCode = QueueEnsureCapacity(self, self->_count + 1);
+    if (errorCode != 0) {
+        return errorCode;
+    }
+    void* tail = (char*)self->_items + self->_tailIndex * self->_itemSize;
+    memcpy(tail, item, self->_itemSize);
+    self->_tailIndex = (self->_tailIndex + 1) % self->_capacity;
+    ++self->_count;
+    return errorCode;
+}
+
+int QueueDequeue(struct Queue* self, void* OutResult) {
+    if (!self) {
+        errno = EINVAL;
+        return EINVAL;
+    }
+    if (self->_count < 1) {
+        errno = EPERM;
+        return EPERM;
+    }
+    void* head = (char*)self->_items + self->_headIndex * self->_itemSize;
+
+    if (OutResult) {
+        memcpy(OutResult, head, self->_itemSize);
+    }
+    // sanitize the dequeued item in the container
+    memset(head, 0, self->_itemSize);
+
+    self->_headIndex = (self->_headIndex + 1) % self->_capacity;
+    --self->_count;
+    return 0;
+}
+
+size_t QueueGetCount(struct Queue* self) {
+    if (!self) {
+        errno = EINVAL;
+        return EINVAL;
+    }
+    return self->_count;
+}
+
+static int QueueEnsureCapacity(struct Queue* self, size_t minCapacity) {
+    if (!self || minCapacity < 1) {
+        errno = EINVAL;
+        return EINVAL;
+    }
+    if (self->_capacity < minCapacity) {
+        minCapacity = (self->_capacity * 2 > minCapacity) ? self->_capacity * 2 : minCapacity;
+        void* newItems = calloc(minCapacity, self->_itemSize);
+        if (!newItems) {
+            errno = ENOMEM;
+            return ENOMEM;
+        }
+        size_t firstChunkCount = self->_capacity - (self->_headIndex + self->_count) % self->_capacity;
+        memcpy(newItems, (char*)self->_items + self->_headIndex, firstChunkCount * self->_itemSize);
+
+        self->_headIndex = 0;
+
+        size_t secondChunkCount = self->_count - firstChunkCount;
+        memcpy((char*)newItems + firstChunkCount, self->_items, secondChunkCount * self->_itemSize);
+
+        self->_tailIndex = self->_headIndex + self->_count;
+
+        free(self->_items);
+        self->_items = newItems;
+        self->_capacity = minCapacity;
+    }
+    return 0;
+}


Changes to fix the Irix N32/egcs build; thanks to Jason Heirtzler <jasonh@cthulhu.engr.sgi.com>

--- dbm/include/mcom_db.h
+++ dbm/include/mcom_db.h
@@ -56,6 +56,8 @@

 #ifndef HAVE_SYS_CDEFS_H
 #include "cdefs.h"
+#else
+#include <cdefs.h>
 #endif
 #include "prtypes.h"


QPSSetup_MPGP: remove reset statistics

QPSSetup_MPGP: remove reset statistics

--- src/qps/impls/mpgp/mpgp.c
+++ src/qps/impls/mpgp/mpgp.c
@@ -236,13 +236,6 @@
   Vec               lb,ub;

   PetscFunctionBegin;
-  /* reset statistics*/
-  mpgp->ncg                  = 0;
-  mpgp->nexp                 = 0;
-  mpgp->nmv                  = 0;
-  mpgp->nprop                = 0;
-  mpgp->currentStepType      = ' ';
-
   /* set the number of working vectors */
   TRY( QPSSetWorkVecs(qps,7) );

@@ -340,6 +333,7 @@
   TRY( VecCopy(phi, p) );                         /* p=phi */

   alpha = mpgp->alpha;
+  mpgp->currentStepType = ' ';
   qps->iteration = 0;                             /* main iteration counter */
   while (1)                                       /* main cycle */
   {


oops, forgot this

oops, forgot this

svn path=/trunk/KDE/kdepim/akonadiserver/; revision=559017

error: pathspec 'server/tests/unittest/handlertest.h' did not match any file(s) known to git

--- server/tests/unittest/handlertest.h
+++ server/tests/unittest/handlertest.h
@@ -0,0 +1,49 @@
+/***************************************************************************
+ *   Copyright (C) 2006 by Till Adam <adam@kde.org>                        *
+ *                                                                         *
+ *   This program is free software; you can redistribute it and/or modify  *
+ *   it under the terms of the GNU Library General Public License as       *
+ *   published by the Free Software Foundation; either version 2 of the    *
+ *   License, or (at your option) any later version.                       *
+ *                                                                         *
+ *   This program is distributed in the hope that it will be useful,       *
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
+ *   GNU General Public License for more details.                          *
+ *                                                                         *
+ *   You should have received a copy of the GNU Library General Public     *
+ *   License along with this program; if not, write to the                 *
+ *   Free Software Foundation, Inc.,                                       *
+ *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.         *
+ ***************************************************************************/
+
+#ifndef HANDLERTEST_H
+#define HANDLERTEST_H
+
+#include <QtTest/QtTest>
+
+#include "handler.h"
+#include "response.h"
+
+using namespace Akonadi;
+
+class HandlerTest: public QObject
+{
+  Q_OBJECT
+
+  private slots:
+    void initTestCase();
+    void testInit();
+    void testSeparatorList();
+    void testRootPercentList();
+    void testRootStarList();
+    void testInboxList();
+    void testFetch();
+
+  private:
+    // Helper
+    Response nextResponse( QSignalSpy& spy );
+    Handler* getHandlerFor( const QByteArray& command );
+};
+
+#endif


Fixed issue with dw_mle_import() in Unicode mode. Need to convert to Unicode before doing buffer manipulation.

--- win/dw.c
+++ win/dw.c
@@ -7949,12 +7949,12 @@
 unsigned int API dw_mle_import(HWND handle, char *buffer, int startpoint)
 {
    int textlen, len = GetWindowTextLength(handle);
-   TCHAR *tmpbuf;
+   TCHAR *tmpbuf, *srcbuf = UTF8toWide(buffer);

    if(startpoint < 0)
       startpoint = 0;

-   if(!buffer || (textlen = (int)strlen(buffer)) < 1)
+   if(!buffer || (textlen = (int)_tcslen(srcbuf)) < 1)
       return startpoint;

    tmpbuf = calloc(sizeof(TCHAR), len + textlen + startpoint + 2);
@@ -7972,7 +7972,7 @@
       if(copylen > 0)
          memcpy(dest, start, copylen*sizeof(TCHAR));
    }
-   memcpy(&tmpbuf[startpoint], UTF8toWide(buffer), textlen*sizeof(TCHAR));
+   memcpy(&tmpbuf[startpoint], srcbuf, textlen*sizeof(TCHAR));

    SetWindowText(handle, tmpbuf);


act: fix memory leak in rtnl_act_parse()

Acked-by: Cong Wang <0f114804888b88d50037b04b42e57b858d851b87@gmail.com>
Signed-off-by: Thomas Haller <16e26612e4159990a6b3691e92592e691ff74132@redhat.com>

--- lib/route/act.c
+++ lib/route/act.c
@@ -384,6 +384,7 @@

 int rtnl_act_parse(struct rtnl_act **head, struct nlattr *tb)
 {
+	struct rtnl_act *act;
 	struct rtnl_tc_ops *ops;
 	struct nlattr *tb2[TCA_ACT_MAX + 1];
 	struct nlattr *nla[TCA_ACT_MAX_PRIO + 1];
@@ -396,7 +397,6 @@
 		return err;

 	for (i = 0; i < TCA_ACT_MAX_PRIO && nla[i]; i++) {
-		struct rtnl_act *act;
 		struct rtnl_tc *tc;

 		act = rtnl_act_alloc();
@@ -447,6 +447,7 @@
 	return 0;

 err_free:
+	rtnl_act_put (act);
 	rtnl_act_put_all(head);

 	return err;


  * Added test code for chxj_css_parse_style_attr() function.

git-svn-id: 5a656d61eb83e8a11bc10c623638a3ef5e8fa3fa@2711 1a406e8e-add9-4483-a2c8-d8cac5b7c224

--- test/chxj_css/test_chxj_css.c
+++ test/chxj_css/test_chxj_css.c
@@ -96,6 +96,8 @@

 /* style attribute */
 void test_chxj_css_parse_style_attr_001();
+void test_chxj_css_parse_style_attr_002();
+void test_chxj_css_parse_style_attr_003();
 /* pend */

 int
@@ -166,6 +168,8 @@
   CU_add_test(css_suite, "test css find_pseudo_selector 004",               test_chxj_css_find_selector_pseudo_004);

   CU_add_test(css_suite, "test css parse style attr 001",                   test_chxj_css_parse_style_attr_001);
+  CU_add_test(css_suite, "test css parse style attr 002",                   test_chxj_css_parse_style_attr_002);
+  CU_add_test(css_suite, "test css parse style attr 003",                   test_chxj_css_parse_style_attr_003);
   /* aend */

   CU_basic_run_tests();
@@ -3016,6 +3020,133 @@
   fprintf(stderr, "end %s\n", __func__);
 #undef TEST_STRING
 }
+
+
+char *test_chxj_serf_get057(request_rec *r, apr_pool_t *ppool, const char *uri_path)
+{
+  static char *css = "a:focus { display: none }\n"
+                     "a:link  { display: none }\n"
+                     "a       { display: none }\n"
+                     "hr      { display: none }\n"
+                     "a:visited { display:none }";
+
+  return css;
+}
+void test_chxj_css_parse_style_attr_002()
+{
+  Doc doc;
+  Node *node;
+  Node *tmp_node;
+  Node *node_sv;
+  css_stylesheet_t *ret;
+  css_selector_t *sel;
+  css_property_t *cur_prop;
+  int ii;
+  int jj;
+  APR_INIT;
+
+  chxj_serf_get = test_chxj_serf_get057;
+
+  fprintf(stderr, "start %s\n", __func__);
+  doc.r = &r;
+  qs_init_malloc(&doc);
+  qs_init_root_node(&doc);
+  doc.parse_mode = PARSE_MODE_CHTML;
+
+
+  apr_uri_parse(p, "http://localhost:888/abc", &r.parsed_uri); \
+
+  ret = chxj_css_parse_from_uri(&r, r.pool, NULL, "/hoge.css");
+  CU_ASSERT(ret != NULL);
+  ret = chxj_css_parse_style_attr(&doc, ret, "br", "abc", NULL, "clear:both");
+  CU_ASSERT(ret != NULL);
+
+  ii = 0;
+  for (sel = ret->selector_head.next;ret && sel != &ret->selector_head; sel = sel->next) {
+    fprintf(stderr, "%d %s\n", ii, sel->name);
+    switch (ii) {
+    case 5:
+      jj = 0;
+      for (cur_prop = sel->property_head.next; cur_prop != &sel->property_head; cur_prop = cur_prop->next) {
+        fprintf(stderr, "%d %s\n", jj, cur_prop->name);
+        switch (jj) {
+        case 0:
+          CU_ASSERT(strcasecmp(cur_prop->name,  "clear") == 0);
+          CU_ASSERT(strcasecmp(cur_prop->value, "both") == 0);
+          break;
+        }
+        jj++;
+      }
+    }
+    ii++;
+  }
+  APR_TERM;
+  fprintf(stderr, "end %s\n", __func__);
+#undef TEST_STRING
+}
+
+char *test_chxj_serf_get058(request_rec *r, apr_pool_t *ppool, const char *uri_path)
+{
+  static char *css = "a:focus { display: none }\n"
+                     "a:link  { display: none }\n"
+                     "a       { display: none }\n"
+                     "hr      { display: none }\n"
+                     "a:visited { display:none }";
+
+  return css;
+}
+void test_chxj_css_parse_style_attr_003()
+{
+  Doc doc;
+  Node *node;
+  Node *tmp_node;
+  Node *node_sv;
+  css_stylesheet_t *ret;
+  css_selector_t *sel;
+  css_property_t *cur_prop;
+  int ii;
+  int jj;
+  APR_INIT;
+
+  chxj_serf_get = test_chxj_serf_get058;
+
+  fprintf(stderr, "start %s\n", __func__);
+  doc.r = &r;
+  qs_init_malloc(&doc);
+  qs_init_root_node(&doc);
+  doc.parse_mode = PARSE_MODE_CHTML;
+
+
+  apr_uri_parse(p, "http://localhost:888/abc", &r.parsed_uri); \
+
+  ret = chxj_css_parse_from_uri(&r, r.pool, NULL, "/hoge.css");
+  CU_ASSERT(ret != NULL);
+  ret = chxj_css_parse_style_attr(&doc, ret, "br", "abc", "id1", "clear:both");
+  CU_ASSERT(ret != NULL);
+
+  ii = 0;
+  for (sel = ret->selector_head.next;ret && sel != &ret->selector_head; sel = sel->next) {
+    fprintf(stderr, "%d %s\n", ii, sel->name);
+    switch (ii) {
+    case 5:
+      jj = 0;
+      for (cur_prop = sel->property_head.next; cur_prop != &sel->property_head; cur_prop = cur_prop->next) {
+        fprintf(stderr, "%d %s\n", jj, cur_prop->name);
+        switch (jj) {
+        case 0:
+          CU_ASSERT(strcasecmp(cur_prop->name,  "clear") == 0);
+          CU_ASSERT(strcasecmp(cur_prop->value, "both") == 0);
+          break;
+        }
+        jj++;
+      }
+    }
+    ii++;
+  }
+  APR_TERM;
+  fprintf(stderr, "end %s\n", __func__);
+#undef TEST_STRING
+}
 /*
  * vim:ts=2 et
  */


Let pool_extract_table_oids handle COPY FROM.

--- pool_memqcache.c
+++ pool_memqcache.c
@@ -713,6 +713,20 @@
 		AlterTableStmt *stmt = (AlterTableStmt *)node;
 		table = nodeToString(stmt->relation);
 	}
+
+	else if (IsA(node, CopyStmt))
+	{
+		CopyStmt *stmt = (CopyStmt *)node;
+		if (stmt->is_from)		/* COPY FROM? */
+		{
+			table = nodeToString(stmt->relation);
+		}
+		else
+		{
+			return 0;
+		}
+	}
+
 	else if (IsA(node, DropStmt))
 	{
 		ListCell *cell;


Support the TLS_RSA_WITH_NULL_SHA cipher suite.  Bug 161529.  Fix Usage.

--- security/nss/cmd/tstclnt/tstclnt.c
+++ security/nss/cmd/tstclnt/tstclnt.c
@@ -103,6 +103,7 @@
     TLS_DHE_DSS_WITH_AES_256_CBC_SHA, 	    	/* w */
     TLS_DHE_RSA_WITH_AES_256_CBC_SHA,       	/* x */
     TLS_RSA_WITH_AES_256_CBC_SHA,     	    	/* y */
+    SSL_RSA_WITH_NULL_SHA,			/* z */
     0
 };

@@ -220,17 +221,18 @@
 "l    SSL3 RSA EXPORT WITH DES CBC SHA\t(new)\n"
 "m    SSL3 RSA EXPORT WITH RC4 56 SHA\t(new)\n"
 "n    SSL3 RSA WITH RC4 128 SHA\n"
-"o    TLS  DHE DSS WITH RC4 128 SHA\n"
+"o    SSL3 DHE DSS WITH RC4 128 SHA\n"
 "p    SSL3 DHE RSA WITH 3DES EDE CBC SHA\n"
 "q    SSL3 DHE DSS WITH 3DES EDE CBC SHA\n"
 "r    SSL3 DHE RSA WITH DES CBC SHA\n"
 "s    SSL3 DHE DSS WITH DES CBC SHA\n"
-"t    TLS_DHE_DSS_WITH_AES_128_CBC_SHA\n"
-"u    TLS_DHE_RSA_WITH_AES_128_CBC_SHA\n"
-"v    TLS_RSA_WITH_AES_128_CBC_SHA\n"
-"w    TLS_DHE_DSS_WITH_AES_256_CBC_SHA\n"
-"x    TLS_DHE_RSA_WITH_AES_256_CBC_SHA\n"
-"y    TLS_RSA_WITH_AES_256_CBC_SHA\n"
+"t    SSL3 DHE DSS WITH AES 128 CBC SHA\n"
+"u    SSL3 DHE RSA WITH AES 128 CBC SHA\n"
+"v    SSL3 RSA WITH AES 128 CBC SHA\n"
+"w    SSL3 DHE DSS WITH AES 256 CBC SHA\n"
+"x    SSL3 DHE RSA WITH AES 256 CBC SHA\n"
+"y    SSL3 RSA WITH AES 256 CBC SHA\n"
+"z    SSL3 RSA WITH NULL SHA\n"
 	);
     exit(1);
 }


Oops - fixed the fix. The prototype now correctly unpacks into a DHPublicKey structure.

--- security/nss/lib/cryptohi/seckey.c
+++ security/nss/lib/cryptohi/seckey.c
@@ -89,10 +89,9 @@
 };

 const SEC_ASN1Template SECKEY_DHParamKeyTemplate[] = {
-    { SEC_ASN1_SEQUENCE,  0, NULL, sizeof(PQGParams) },
-    { SEC_ASN1_INTEGER, offsetof(PQGParams,prime), },
-    { SEC_ASN1_INTEGER, offsetof(PQGParams,subPrime), },
-    { SEC_ASN1_INTEGER, offsetof(PQGParams,base), },
+    { SEC_ASN1_SEQUENCE,  0, NULL, sizeof(SECKEYPublicKey) },
+    { SEC_ASN1_INTEGER, offsetof(SECKEYPublicKey,u.dh.prime), },
+    { SEC_ASN1_INTEGER, offsetof(SECKEYPublicKey,u.dh.base), },
     /* XXX chrisk: this needs to be expanded for decoding of j and validationParms (RFC2459 7.3.2) */
     { SEC_ASN1_SKIP_REST },
     { 0, }
@@ -867,8 +866,7 @@
 	rv = SEC_ASN1DecodeItem(arena, pubk, SECKEY_DHPublicKeyTemplate, &os);
 	if (rv != SECSuccess) break;

-        rv = SEC_ASN1DecodeItem(arena, &pubk->u.dh,
-                             SECKEY_DHParamKeyTemplate,
+        rv = SEC_ASN1DecodeItem(arena, pubk, SECKEY_DHParamKeyTemplate,
                                  &spki->algorithm.parameters);

 	if (rv == SECSuccess) return pubk;


Don't declare sync if we use gusi.

Don't declare sync if we use gusi.

--- Mac/Include/macdefs.h
+++ Mac/Include/macdefs.h
@@ -18,7 +18,9 @@
 extern unsigned char *Pstring(char *);
 extern char *getbootvol(void);
 extern char *getwd(char *);
+#ifndef USE_GUSI
 extern int sync(void);
+#endif

 /* Universal constants: */
 #define MAXPATH 256


add all .h files of all the functions ever called by the GUI

--- tmva/tmvagui/inc/TMVA/TMVAGui.h
+++ tmva/tmvagui/inc/TMVA/TMVAGui.h
@@ -12,6 +12,40 @@
 #include "TClass.h"

 #include "tmvaglob.h"
+#include "TMVA/variablesMultiClass.h"
+#include "TMVA/variables.h"
+#include "TMVA/TMVARegGui.h"
+#include "TMVA/TMVAMultiClassGui.h"
+#include "TMVA/TMVAGui.h"
+#include "TMVA/tmvaglob.h"
+#include "TMVA/rulevisHists.h"
+#include "TMVA/rulevis.h"
+#include "TMVA/rulevisCorr.h"
+#include "TMVA/regression_averagedevs.h"
+#include "TMVA/probas.h"
+#include "TMVA/PlotFoams.h"
+#include "TMVA/paracoor.h"
+#include "TMVA/network.h"
+#include "TMVA/mvaweights.h"
+#include "TMVA/mvasMulticlass.h"
+#include "TMVA/mvas.h"
+#include "TMVA/mvaeffs.h"
+#include "TMVA/MovieMaker.h"
+#include "TMVA/likelihoodrefs.h"
+#include "TMVA/efficiencies.h"
+#include "TMVA/deviations.h"
+#include "TMVA/CorrGuiMultiClass.h"
+#include "TMVA/CorrGui.h"
+#include "TMVA/correlationsMultiClass.h"
+#include "TMVA/correlations.h"
+#include "TMVA/correlationscattersMultiClass.h"
+#include "TMVA/correlationscatters.h"
+#include "TMVA/compareanapp.h"
+#include "TMVA/BoostControlPlots.h"
+#include "TMVA/BDT_Reg.h"
+#include "TMVA/BDT.h"
+#include "TMVA/BDTControlPlots.h"
+#include "TMVA/annconvergencetest.h"
 namespace TMVA{


Apache HTTPd: Cleaned up a couple log messages

--- servers/apache_httpd2/mod_ironbee.c
+++ servers/apache_httpd2/mod_ironbee.c
@@ -1217,8 +1217,11 @@
  * @param[in] plog - Log pool
  * @param[in] s - Base server
  */
-static int ironbee_init(apr_pool_t *pool, apr_pool_t *ptmp, apr_pool_t *plog,
-                        server_rec *s)
+static int ironbee_init(
+    apr_pool_t *pool,
+    apr_pool_t *ptmp,
+    apr_pool_t *plog,
+    server_rec *s)
 {
     ib_status_t    rc;
     module_data_t *mod_data = &module_data;
@@ -1245,8 +1248,9 @@
                            &(mod_data->ib_manager)); /* Engine Manager */
     if (rc != IB_OK) {
         ap_log_error(APLOG_MARK, APLOG_STARTUP|APLOG_NOTICE, 0, s,
-                     "Failed to create IronBee Engine Manager (%d)", rc);
-        return rc;
+                     "Failed to create IronBee Engine Manager (%s)",
+                     ib_status_to_string(rc));
+        return IB2AP(rc);
     }

     /* Create the initial engine */
@@ -1254,7 +1258,8 @@
                                   mod_data->ib_config_file);
     if (rc != IB_OK) {
         ap_log_error(APLOG_MARK, APLOG_STARTUP|APLOG_NOTICE, 0, s,
-                     "Ironbee failed to create initial engine! (%d)", rc);
+                     "Ironbee failed to create initial engine! (%s)",
+                     ib_status_to_string(rc));
         return IB2AP(rc);
     }