Improve printing of self times in the flat profile for functions that
appear to be never called:

(1) If a function is never called according to its call count but it
    must have been called because its child time is nonzero, then print
    it in the flat profile.  Previously, if its call count was zero
    then we only printed it in the flat profile if its self time was
    nonzero.

(2) If a function has a zero call count but has a nonzero self or child
    time, then print its total self time in the self time per call
    column as a percentage of the total (self + child) time.  It is
    not possible to print the times per call in this case because the
    call count is zero.  Previously, this was handled by leaving both
    per-call columns blank.  The self time is printed in another column
    but there was no way to recover the total time.

(1) partially fixes the case of the "never called" function main() and
prepares for (2) to apply to main() and other functions.  Profiling
of main() was lost in the conversion from a.out to ELF, so main()'s
call count has always been zero for many years; then in the common
case where main() is a tiny function, it gets no profiling ticks, so
main() was completely lost in the flat profile.

(2) improves mainly cases like kernel threads.  Most kernel threads
appear to be never called because they are always started before
userland can run to turn on profiling.  As for main(), the fact that
they are called is not very interesting and their callers are
uninteresting, but their relative self time is interesting since they
are long-running.

Almost always printing percentages in the per-call columns would be
more useful than almost always printing 0.0ms.  0.1ms is now a long
time, so only very large functions take that long per call.  The accuracy
per call can approach 1-10 nsec provided programs are run for about
100000 times as long as is necessary to get this accuracy with high
resolution kernel profiling.

--- usr.bin/gprof/printgprof.c
+++ usr.bin/gprof/printgprof.c
@@ -130,7 +130,8 @@
     register nltype	*np;
 {

-    if ( zflag == 0 && np -> ncall == 0 && np -> time == 0 ) {
+    if ( zflag == 0 && np -> ncall == 0 && np -> time == 0 &&
+	 np -> childtime == 0 ) {
 	return;
     }
     actime += np -> time;
@@ -153,6 +154,9 @@
 	    printf( " %8ld %8.2f %8.2f  " , np -> ncall ,
 		1000 * np -> time / hz / np -> ncall ,
 		1000 * ( np -> time + np -> childtime ) / hz / np -> ncall );
+    } else if ( np -> time != 0 || np -> childtime != 0 ) {
+	printf( " %8ld %7.2f%% %8.8s  " , np -> ncall ,
+	    100 * np -> time / ( np -> time + np -> childtime ) , "" );
     } else {
 	printf( " %8.8s %8.8s %8.8s  " , "" , "" , "" );
     }


clock: enable monotonic clock when we can

Enable the monotonic clock by default when we can.
Fixes #583554

--- gst/gstsystemclock.c
+++ gst/gstsystemclock.c
@@ -60,6 +60,16 @@
 #define GST_SYSTEM_CLOCK_GET_PRIVATE(obj)  \
    (G_TYPE_INSTANCE_GET_PRIVATE ((obj), GST_TYPE_SYSTEM_CLOCK, \
         GstSystemClockPrivate))
+
+#ifdef HAVE_POSIX_TIMERS
+# ifdef HAVE_MONOTONIC_CLOCK
+#  define DEFAULT_CLOCK_TYPE GST_CLOCK_TYPE_MONOTONIC
+# else
+#  define DEFAULT_CLOCK_TYPE GST_CLOCK_TYPE_REALTIME
+# endif
+#else
+#define DEFAULT_CLOCK_TYPE GST_CLOCK_TYPE_REALTIME
+#endif

 enum
 {
@@ -122,7 +132,7 @@
   g_object_class_install_property (gobject_class, PROP_CLOCK_TYPE,
       g_param_spec_enum ("clock-type", "Clock type",
           "The type of underlying clock implementation used",
-          GST_TYPE_CLOCK_TYPE, GST_CLOCK_TYPE_REALTIME, G_PARAM_READWRITE));
+          GST_TYPE_CLOCK_TYPE, DEFAULT_CLOCK_TYPE, G_PARAM_READWRITE));

   gstclock_class->get_internal_time = gst_system_clock_get_internal_time;
   gstclock_class->get_resolution = gst_system_clock_get_resolution;
@@ -142,7 +152,7 @@

   clock->priv = GST_SYSTEM_CLOCK_GET_PRIVATE (clock);

-  clock->priv->clock_type = GST_CLOCK_TYPE_REALTIME;
+  clock->priv->clock_type = DEFAULT_CLOCK_TYPE;
   clock->priv->timer = gst_poll_new_timer ();

 #if 0


deconfuse vprint, print holdcount, not refcount when we are talking about holdcnt

--- kern/vfs_subr.c
+++ kern/vfs_subr.c
@@ -1,4 +1,4 @@
-/*	$OpenBSD: vfs_subr.c,v 1.28 1998/12/10 21:46:58 art Exp $	*/
+/*	$OpenBSD: vfs_subr.c,v 1.29 1998/12/22 10:43:37 art Exp $	*/
 /*	$NetBSD: vfs_subr.c,v 1.53 1996/04/22 01:39:13 christos Exp $	*/

 /*
@@ -1246,7 +1246,7 @@

 	if (label != NULL)
 		printf("%s: ", label);
-	printf("type %s, usecount %d, writecount %d, refcount %ld,",
+	printf("type %s, usecount %d, writecount %d, holdcount %ld,",
 		typename[vp->v_type], vp->v_usecount, vp->v_writecount,
 		vp->v_holdcnt);
 	buf[0] = '\0';


Bluetooth: Remove redundant NULL check

Bluetooth: Remove redundant NULL check

All callers of hci_inquiry_cache_update() pass a non-NULL ssp pointer to
it and even the function itself assumes in another place that the
pointer is non-NULL. Therefore, remove the redundant check.

Signed-off-by: Johan Hedberg <628991c7b0a19c384f9b99c21ec330ce952bb838@intel.com>
Signed-off-by: Marcel Holtmann <44592b4eea36663c86b994bb0ea99d15309c1c7d@holtmann.org>

--- net/bluetooth/hci_core.c
+++ net/bluetooth/hci_core.c
@@ -2028,8 +2028,7 @@

 	hci_remove_remote_oob_data(hdev, &data->bdaddr);

-	if (ssp)
-		*ssp = data->ssp_mode;
+	*ssp = data->ssp_mode;

 	ie = hci_inquiry_cache_lookup(hdev, &data->bdaddr);
 	if (ie) {


fix warning about unused variables.

fix warning about unused variables.

svn path=/trunk/kdesupport/strigi/; revision=640115

--- src/streamindexer/indexwriter.h
+++ src/streamindexer/indexwriter.h
@@ -58,8 +58,8 @@
         const std::string& value) = 0;
     virtual void addField(const Indexable*, const RegisteredField* fieldname,
         const unsigned char* data, int32_t size) = 0;
-    virtual void addField(const Indexable*, const RegisteredField* fieldname,
-        uint32_t value) {}
+    virtual void addField(const Indexable*, const RegisteredField* /*fielname*/,
+        uint32_t /*value*/) {}
     virtual void finishIndexable(const Indexable*) = 0;
 public:
     virtual ~IndexWriter() {}


Fix for older MSVC compilers without operator<< for long longs (not tested on MSVC6)

--- include/log.h
+++ include/log.h
@@ -41,4 +41,15 @@
 	virtual ~FileLogger() {};
 };

+// For older MSVC compilers
+#if defined(_MSC_VER) && (_MSC_VER <= 1200)
+static std::ostream& operator<<(std::ostream& s, QWord val)
+{
+	char szTmp[42]; // overkill, but who counts
+	sprintf(szTmp, "%I64u", val);
+	s << szTmp;
+	return s;
+}
 #endif
+
+#endif


explicitly specify IPPROTO_UDP when calling getaddrinfo().

Obtained from:	KAME
MFC after:	1 week

--- usr.sbin/route6d/route6d.c
+++ usr.sbin/route6d/route6d.c
@@ -612,6 +612,7 @@
 	memset(&hints, 0, sizeof(hints));
 	hints.ai_family = PF_INET6;
 	hints.ai_socktype = SOCK_DGRAM;
+	hints.ai_protocol = IPPROTO_UDP;
 	hints.ai_flags = AI_PASSIVE;
 	error = getaddrinfo(NULL, port, &hints, &res);
 	if (error) {
@@ -667,6 +668,7 @@
 	memset(&hints, 0, sizeof(hints));
 	hints.ai_family = PF_INET6;
 	hints.ai_socktype = SOCK_DGRAM;
+	hints.ai_protocol = IPPROTO_UDP;
 	error = getaddrinfo(RIP6_DEST, port, &hints, &res);
 	if (error) {
 		fatal("%s", gai_strerror(error));


fix wrong SPI clock speed #545

fix wrong SPI clock speed #545

--- src/MFRC522.h
+++ src/MFRC522.h
@@ -19,7 +19,7 @@
 #include <SPI.h>

 #ifndef MFRC522_SPICLOCK
-#define MFRC522_SPICLOCK SPI_CLOCK_DIV4			// MFRC522 accept upto 10MHz
+#define MFRC522_SPICLOCK (4000000u)	// MFRC522 accept upto 10MHz, set to 4MHz.
 #endif

 // Firmware data for self-test


compat: Fix sparse address space warnings

In compat_sys_old_getrlimit() we pass a kernel pointer to
sys_old_getrlimit() inside a set_fs() bracket.  This is okay, so we
can safely cast the affected pointer to __user.

In compat_clock_nanosleep_restart(), the variable "rmtp" holds a user
pointer.  Annotate it as such.

Both of these warnings are ancient, but were reported by Fengguang
Wu's test system due to other changes.

Signed-off-by: H. Peter Anvin <8a453bad9912ffe59bc0f0b8abe03df9be19379e@linux.intel.com>
Cc: Toyo Abe <5ebdafbe39850dbad9dff64c7a633852072a3489@mvista.com>
Link: 6dc31939b726132661bd7417e1f1385ca6abdade@git.kernel.org

--- kernel/compat.c
+++ kernel/compat.c
@@ -451,7 +451,7 @@
 	mm_segment_t old_fs = get_fs();

 	set_fs(KERNEL_DS);
-	ret = sys_old_getrlimit(resource, &r);
+	ret = sys_old_getrlimit(resource, (struct rlimit __user *)&r);
 	set_fs(old_fs);

 	if (!ret) {
@@ -799,7 +799,7 @@
 	long err;
 	mm_segment_t oldfs;
 	struct timespec tu;
-	struct compat_timespec *rmtp = restart->nanosleep.compat_rmtp;
+	struct compat_timespec __user *rmtp = restart->nanosleep.compat_rmtp;

 	restart->nanosleep.rmtp = (struct timespec __user *) &tu;
 	oldfs = get_fs();


Added more XML comments.

Added more XML comments.

--- CefSharp/Cef.h
+++ CefSharp/Cef.h
@@ -65,8 +65,10 @@
             return _boundObjects;
         }

-        // TODO: Add proper XML comments for all of these, so we can get proper IntelliSense in C# code.
     public:
+
+        ///  Gets whether CefSharp is initialized.
+        /// <value> True if CefSharp is initalized, false otherwise </value>
         static property bool IsInitialized
         {
             bool get()
@@ -81,6 +83,8 @@
             }
         }

+        ///  Returns CefSharp Version
+        /// <value> CefSharp Version as a String</value>
         static property String^ CefSharpVersion
         {
             String^ get()
@@ -90,6 +94,8 @@
             }
         }

+        ///  Returns CEF Version
+        /// <value>CEF Version as a String</value>
         static property String^ CefVersion
         {
             String^ get()
@@ -98,6 +104,8 @@
             }
         }

+        ///  Returns Chromium Version
+        /// <value> Chromium Version as a String</value>
         static property String^ ChromiumVersion
         {
             String^ get()
@@ -109,12 +117,17 @@
             }
         }

+        ///  Initialize CefSharp with default settings.
+        /// <return> True if successful and false otherwise.</return>
         static bool Initialize()
         {
             auto cefSettings = gcnew CefSettings();
             return Initialize(cefSettings);
         }

+        ///  Initialize CefSharp settings.
+        ///<param name="cefSettings">CefSharp configuration settings.</param>
+        /// <return> True if successful and false otherwise.</return>
         static bool Initialize(CefSettings^ cefSettings)
         {
             bool success = false;
@@ -148,12 +161,19 @@
             return success;
         }

+        /// Bind a C# class to a javascript object.
+        ///<param name="name">Name of javascript object.</param>
+        ///<param name="objectToBind">C# object to bind.</param>
+        /// <return> Returns True</return>
         static bool RegisterJsObject(String^ name, Object^ objectToBind)
         {
             _boundObjects[name] = objectToBind;
             return true;
         }

+        ///  Vist all cookies. The returned cookies are ordered by longest path, then by earliest creation date.
+        ///<param name="visitor">CefSharp Cookie Visitor</param>
+        /// <return> Returns false if cookies cannot be accessed, otherwise true.</return>
         static bool VisitAllCookies(ICookieVisitor^ visitor)
         {
             CefRefPtr<CookieVisitor> cookieVisitor = new CookieVisitor(visitor);
@@ -169,6 +189,13 @@
             }
         }

+        ///  Vist a subset of cookies.  The results are filtered by the given url scheme, host, domain and path.
+        /// If |includeHttpOnly| is true HTTP-only cookies will also be included in the results. The returned cookies
+        /// are ordered by longest path, then by earliest creation date.
+        ///<param name="url">Cookie Url</param>
+        ///<param name="includeHttpOnly">Allow HTTP-only cookies to be shown in results</param>
+        ///<param name="visitor">CefSharp Cookie Visitor</param>
+        /// <return> Returns false if cookies cannot be accessed, otherwise true.</return>
         static bool VisitUrlCookies(String^ url, bool includeHttpOnly, ICookieVisitor^ visitor)
         {
             CefRefPtr<CookieVisitor> cookieVisitor = new CookieVisitor(visitor);
@@ -185,6 +212,19 @@
             }
         }

+        /// Set a CefSharp Cookie. This function expects each attribute to be well-formed. It will check for disallowed
+        /// characters (e.g. the ';' character is disallowed within the cookie value attribute) and will return false without setting
+        /// the cookie if such characters are found.
+        ///<param name="url">Cookie Url</param>
+        ///<param name="name">Cookie Name</param>
+        ///<param name="value">Cookie Value</param>
+        ///<param name="domain">Cookie Domain</param>
+        ///<param name="path">Cookie Path</param>
+        ///<param name="secure">Marks cookie as secure (i.e. its scope is limited to secure channels, typically HTTPS).</param>
+        ///<param name="httponly">Marks the cookiet as HTTP Only(i.e. the cookie is inaccessible to client-side scripts).</param>
+        ///<param name="has_expires">The cookie expiration date is only used if this is true.</param>
+        ///<param name="expires">Date of cookie expiration. Only used if has_expires is true.</param>
+        /// <return> Returns false if cookie cannot be set (Like if illegal charecters such as ';' are used), otherwise true.</return>
         static bool SetCookie(String^ url, String^ name, String^ value, String^ domain, String^ path, bool secure, bool httponly, bool has_expires, DateTime expires)
         {
             msclr::lock l(_sync);
@@ -216,11 +256,24 @@
             return _result;
         }

+        /// Set a CefSharp Cookie using mostly default parameters. This function expects each attribute to be well-formed. It will check for disallowed
+        /// characters (e.g. the ';' character is disallowed within the cookie value attribute) and will return false without setting
+        /// the cookie if such characters are found.
+        ///<param name="url">Cookie Url</param>
+        ///<param name="name">Cookie Name</param>
+        ///<param name="value">Cookie Value</param>
+        ///<param name="domain">Cookie Domain</param>
+        ///<param name="expires">Date of cookie expiration. Only used if has_expires is true.</param>
+        /// <return> Returns false if cookie cannot be set (Like if illegal charecters such as ';' are used), otherwise true.</return>
         static bool SetCookie(String^ url, String^ domain, String^ name, String^ value, DateTime expires)
         {
             return SetCookie(url, name, value, domain, "/", false, false, true, expires);
         }

+        ///  Delete all cookies that match the both following parameters. If both |url| and |name| are empty all cookies will be deleted.
+        ///<param name="url">(Optional) Cookie Url</param>
+        ///<param name="name">(Optional) Name of Cookie/param>
+        /// <return> Returns false if a non-empty invalid URL is specified or if cookies cannot be accessed, otherwise true.</return>
         static bool DeleteCookies(String^ url, String^ name)
         {
             msclr::lock l(_sync);
@@ -240,6 +293,13 @@
             return _result;
         }

+        ///  Sets the directory path that will be used for storing cookie data. If |path| is empty data will be stored in
+        /// memory only. Otherwise, data will be stored at the specified |path|. To persist session cookies (cookies without an expiry
+        /// date or validity interval) set |persist_session_cookies| to true. Session cookies are generally intended to be transient and
+        /// most Web browsers do not persist them. Returns false if cookies cannot be accessed.
+        ///<param name="path"> (Optional) File path to write cookies to.</param>
+        ///<param name="persistSessionCookies">(Optional) Persist Session Cookies.</param>
+        /// <return> Returns false if a non-empty invalid URL is specified or if cookies cannot be accessed, otherwise true.</return>
         static bool SetCookiePath(String^ path, bool persistSessionCookies)
         {
             CefRefPtr<CefCookieManager> manager = CefCookieManager::GetGlobalManager();
@@ -254,9 +314,8 @@
             }
         }

-        ///
-        ///
-        /// Shuts down CefSharp and the underlying CEF infrastructure. This method is safe to call multiple times; it will only
+        ///  Shuts down CefSharp and the underlying CEF infrastructure.
+        /// This method is safe to call multiple times; it will only
         /// shut down CEF on the first calls (all following calls will be ignored).
         ///
         static void Shutdown()


Bluetooth: Fix sending wrong store hint for new long term keys

The long term keys should only be stored when they belong to an
indentity address. The identity address can either be a public
address or a random static address.

For all other addresses (unresovable or resolvable) tell userspace
that the long term key is not persistent.

Signed-off-by: Marcel Holtmann <44592b4eea36663c86b994bb0ea99d15309c1c7d@holtmann.org>
Signed-off-by: Johan Hedberg <628991c7b0a19c384f9b99c21ec330ce952bb838@intel.com>

--- net/bluetooth/hci_core.c
+++ net/bluetooth/hci_core.c
@@ -2685,6 +2685,7 @@
 {
 	struct smp_ltk *key, *old_key;
 	bool master = ltk_type_master(type);
+	u8 persistent;

 	old_key = hci_find_ltk_by_addr(hdev, bdaddr, addr_type, master);
 	if (old_key)
@@ -2708,8 +2709,13 @@
 	if (!new_key)
 		return 0;

+	if (addr_type == ADDR_LE_DEV_RANDOM && (bdaddr->b[5] & 0xc0) != 0xc0)
+		persistent = 0;
+	else
+		persistent = 1;
+
 	if (type == HCI_SMP_LTK || type == HCI_SMP_LTK_SLAVE)
-		mgmt_new_ltk(hdev, key, 1);
+		mgmt_new_ltk(hdev, key, persistent);

 	return 0;
 }


Removed duplicate declaration.

Removed duplicate declaration.

--- demo/cmd.c
+++ demo/cmd.c
@@ -34,7 +34,6 @@
 static lsampl_t maxdata[N_CHANS];

-int prepare_cmd_lib(comedi_t *dev, int subdevice, int n_scan, int n_chan, unsigned period_nanosec, comedi_cmd *cmd);
 int prepare_cmd_lib(comedi_t *dev, int subdevice, int n_scan, int n_chan, unsigned period_nanosec, comedi_cmd *cmd);

 void do_cmd(comedi_t *dev,comedi_cmd *cmd);


If the user asks for "kernel sources" to be installed, extract the
SRC_BASE package (src/[A-Z]*) as well as SRC_SYS (src/sys/*).  This
allows users who only install the kernel source code to use the
modern "make buildkernel" approach.

Discussed with:	re (scottl, kensmith)
MFC after:	3 days

--- usr.sbin/sysinstall/dist.c
+++ usr.sbin/sysinstall/dist.c
@@ -254,7 +254,7 @@

     distReset(NULL);
     Dists = _DIST_DEVELOPER;
-    SrcDists = DIST_SRC_SYS;
+    SrcDists = DIST_SRC_SYS | DIST_SRC_BASE;
     KernelDists = selectKernel();
     i = distMaybeSetPorts(self);
     distVerifyFlags();


cpuset: use rebuild_sched_domains() in cpuset_hotplug_workfn()

In cpuset_hotplug_workfn(), partition_sched_domains() is called without
hotplug lock held, which is actually needed (stated in the function
header of partition_sched_domains()).

This patch tries to use rebuild_sched_domains() to solve the above
issue, and makes the code looks a little simpler.

Signed-off-by: Li Zhong <22bc8bfd7eeb9886fe79aed380759aa078990d01@linux.vnet.ibm.com>
Signed-off-by: Li Zefan <a8167b9d27aca9c6624754deb52c4c6420eded04@huawei.com>
Signed-off-by: Tejun Heo <546b05909706652891a87f7bfe385ae147f61f91@kernel.org>

--- kernel/cpuset.c
+++ kernel/cpuset.c
@@ -2172,17 +2172,8 @@
 	flush_workqueue(cpuset_propagate_hotplug_wq);

 	/* rebuild sched domains if cpus_allowed has changed */
-	if (cpus_updated) {
-		struct sched_domain_attr *attr;
-		cpumask_var_t *doms;
-		int ndoms;
-
-		mutex_lock(&cpuset_mutex);
-		ndoms = generate_sched_domains(&doms, &attr);
-		mutex_unlock(&cpuset_mutex);
-
-		partition_sched_domains(ndoms, doms, attr);
-	}
+	if (cpus_updated)
+		rebuild_sched_domains();
 }

 void cpuset_update_active_cpus(bool cpu_online)


Bluetooth: BR/EDR: Implement PIN code reply API

Enables legacy PIN code reply API to user.

Change-Id: I65aa78c2f35dd39f60e48e7280d2379baf07107e
Signed-off-by: Arkadiusz Lichwa <a8f3d827a064762faaf15c916aaf7025632f7d7f@tieto.com>

--- net/bluetooth/hci_core.c
+++ net/bluetooth/hci_core.c
@@ -1562,6 +1562,83 @@

 	bt_conn_unref(conn);
 }
+
+static int pin_code_neg_reply(const bt_addr_t *bdaddr)
+{
+	struct bt_hci_cp_pin_code_neg_reply *cp;
+	struct bt_conn *conn;
+	struct net_buf *buf;
+	int err;
+
+	BT_DBG("");
+
+	conn = bt_conn_lookup_addr_br(bdaddr);
+	if (!conn) {
+		BT_ERR("Can't find conn for %s", bt_addr_str(bdaddr));
+		return -EINVAL;
+	}
+
+	buf = bt_hci_cmd_create(BT_HCI_OP_PIN_CODE_NEG_REPLY, sizeof(*cp));
+	if (!buf) {
+		bt_conn_unref(conn);
+		return -ENOBUFS;
+	}
+
+	cp = net_buf_add(buf, sizeof(*cp));
+	bt_addr_copy(&cp->bdaddr, bdaddr);
+
+	err = bt_hci_cmd_send_sync(BT_HCI_OP_PIN_CODE_NEG_REPLY, buf, NULL);
+
+	bt_conn_unref(conn);
+
+	return err;
+}
+
+static int pin_code_reply(const bt_addr_t *bdaddr, const char *pin, size_t len)
+{
+	struct bt_hci_cp_pin_code_reply *cp;
+	struct bt_conn *conn;
+	struct net_buf *buf;
+	int err;
+
+	BT_DBG("");
+
+	conn = bt_conn_lookup_addr_br(bdaddr);
+	if (!conn) {
+		BT_ERR("Can't find conn for %s", bt_addr_str(bdaddr));
+		return -EINVAL;
+	}
+
+	if (len > 16) {
+		err = -EINVAL;
+		goto cleanup;
+	}
+
+	if (conn->required_sec_level == BT_SECURITY_HIGH && len < 16) {
+		BT_WARN("PIN code for %s is not 16 bytes wide",
+			bt_addr_str(bdaddr));
+		bt_conn_unref(conn);
+		return pin_code_neg_reply(bdaddr);
+	}
+
+	buf = bt_hci_cmd_create(BT_HCI_OP_PIN_CODE_REPLY, sizeof(*cp));
+	if (!buf) {
+		err = -ENOBUFS;
+		goto cleanup;
+	}
+
+	cp = net_buf_add(buf, sizeof(*cp));
+	memset(cp, 0, sizeof(*cp));
+	bt_addr_copy(&cp->bdaddr, bdaddr);
+	cp->pin_len = len;
+	strncpy(cp->pin_code, pin, len);
+
+	err = bt_hci_cmd_send_sync(BT_HCI_OP_PIN_CODE_REPLY, buf, NULL);
+cleanup:
+	bt_conn_unref(conn);
+
+	return err;
+}
 #endif

 static void hci_event(struct net_buf *buf)
@@ -2629,4 +2706,17 @@
 	}
 #endif /* CONFIG_BLUETOOTH_SMP */
 }
+
+#if defined(CONFIG_BLUETOOTH_BREDR)
+void bt_auth_pincode_entry(struct bt_conn *conn, char *pin, size_t len)
+{
+	if (!bt_auth) {
+		return;
+	}
+
+	if (conn->type == BT_CONN_TYPE_BR) {
+		pin_code_reply(&conn->br.dst, pin, len);
+	}
+}
+#endif
 #endif /* CONFIG_BLUETOOTH_SMP || CONFIG_BLUETOOTH_BREDR */


[include] add readb()/writeb() to reg.h

[include] add readb()/writeb() to reg.h

--- include/reg.h
+++ include/reg.h
@@ -38,5 +38,7 @@

 #define writel(v, a) (*REG32(a) = (v))
 #define readl(a) (*REG32(a))
+#define writeb(v, a) (*REG8(a) = (v))
+#define readb(a) (*REG8(a))

 #endif


Changed default output target to stdout (bug 2150874)

--- util/dmtxwrite/dmtxwrite.c
+++ util/dmtxwrite/dmtxwrite.c
@@ -42,8 +42,6 @@
 #include "dmtxwrite.h"
 #include "../common/dmtxutil.h"

-#define MIN(x,y) ((x < y) ? x : y)
-
 char *programName;

 /**
@@ -57,47 +55,47 @@
 main(int argc, char *argv[])
 {
    int err;
-   UserOptions options;
+   UserOptions opt;
    DmtxEncode enc;
    unsigned char codeBuffer[DMTXWRITE_BUFFER_SIZE];
    int codeBufferSize = sizeof codeBuffer;

-   InitUserOptions(&options);
+   InitUserOptions(&opt);

    /* Create and initialize libdmtx structures */
    enc = dmtxEncodeStructInit();

    /* Process user options */
-   err = HandleArgs(&options, &argc, &argv, &enc);
+   err = HandleArgs(&opt, &argc, &argv, &enc);
    if(err != DMTX_SUCCESS)
       ShowUsage(err);

    /* Read input data into buffer */
-   ReadData(&options, &codeBufferSize, codeBuffer);
+   ReadData(&opt, &codeBufferSize, codeBuffer);

    /* Create barcode image */
-   if(options.mosaic)
-      err = dmtxEncodeDataMosaic(&enc, codeBufferSize, codeBuffer, options.sizeIdx);
+   if(opt.mosaic)
+      err = dmtxEncodeDataMosaic(&enc, codeBufferSize, codeBuffer, opt.sizeIdx);
    else
-      err = dmtxEncodeDataMatrix(&enc, codeBufferSize, codeBuffer, options.sizeIdx);
+      err = dmtxEncodeDataMatrix(&enc, codeBufferSize, codeBuffer, opt.sizeIdx);

    if(err == DMTX_FAILURE)
       FatalError(1, _("Unable to encode message (possibly too large for requested size)"));

    /* Write barcode image to requested format */
-   switch(options.format) {
+   switch(opt.format) {
       case 'n':
          break; /* do nothing */
       case 'p':
-         WriteImagePng(&options, &enc);
+         WriteImagePng(&opt, &enc);
          break;
       case 'm':
-         WriteImagePnm(&options, &enc);
+         WriteImagePnm(&opt, &enc);
          break;
    }

    /* Write barcode preview if requested */
-   switch(options.preview) {
+   switch(opt.preview) {
       case 'n':
          break; /* do nothing */
       case 'a':
@@ -119,21 +117,21 @@
  *
  */
 static void
-InitUserOptions(UserOptions *options)
-{
-   memset(options, 0x00, sizeof(UserOptions));
-
-/* options->color = ""; */
-/* options->bgColor = ""; */
-   options->format = 'p';
-   options->inputPath = NULL;
-   options->outputPath = "dmtxwrite.png"; /* XXX needs to have different extensions for other formats */
-   options->preview = 'n';
-   options->rotate = 0;
-   options->sizeIdx = DMTX_SYMBOL_SQUARE_AUTO;
-   options->verbose = 0;
-   options->mosaic = 0;
-   options->dpi = 0; /* default to native resolution of requested image format */
+InitUserOptions(UserOptions *opt)
+{
+   memset(opt, 0x00, sizeof(UserOptions));
+
+/* opt->color = ""; */
+/* opt->bgColor = ""; */
+   opt->format = 'p';
+   opt->inputPath = NULL;    /* default stdin */
+   opt->outputPath = NULL;   /* default stdout */
+   opt->preview = 'n';
+   opt->rotate = 0;
+   opt->sizeIdx = DMTX_SYMBOL_SQUARE_AUTO;
+   opt->verbose = 0;
+   opt->mosaic = 0;
+   opt->dpi = 0; /* default to native resolution of requested image format */
 }

 /**
@@ -145,11 +143,11 @@
  * @return        DMTX_SUCCESS | DMTX_FAILURE
  */
 static int
-HandleArgs(UserOptions *options, int *argcp, char **argvp[], DmtxEncode *enc)
+HandleArgs(UserOptions *opt, int *argcp, char **argvp[], DmtxEncode *enc)
 {
    int err;
    int i;
-   int opt;
+   int optchr;
    int longIndex;
    char *ptr;

@@ -188,25 +186,25 @@
    enc->scheme = DmtxSchemeEncodeAscii;

    for(;;) {
-      opt = getopt_long(*argcp, *argvp, "c:b:d:m:e:f:o:p:r:s:vMR:V", longOptions, &longIndex);
-      if(opt == -1)
+      optchr = getopt_long(*argcp, *argvp, "c:b:d:m:e:f:o:p:r:s:vMR:V", longOptions, &longIndex);
+      if(optchr == -1)
          break;

-      switch(opt) {
+      switch(optchr) {
          case 0: /* --help */
             ShowUsage(0);
             break;
          case 'c':
-            options->color[0] = 0;
-            options->color[1] = 0;
-            options->color[2] = 0;
-            fprintf(stdout, "Option \"%c\" not implemented yet\n", opt);
+            opt->color[0] = 0;
+            opt->color[1] = 0;
+            opt->color[2] = 0;
+            fprintf(stdout, "Option \"%c\" not implemented yet\n", optchr);
             break;
          case 'b':
-            options->bgColor[0] = 255;
-            options->bgColor[1] = 255;
-            options->bgColor[2] = 255;
-            fprintf(stdout, "Option \"%c\" not implemented yet\n", opt);
+            opt->bgColor[0] = 255;
+            opt->bgColor[1] = 255;
+            opt->bgColor[2] = 255;
+            fprintf(stdout, "Option \"%c\" not implemented yet\n", optchr);
             break;
          case 'd':
             err = StringToInt(&(enc->moduleSize), optarg, &ptr);
@@ -229,7 +227,7 @@
                   break;
                case 'f':
                   enc->scheme = DmtxSchemeEncodeAutoFast;
-                  fprintf(stdout, "\"Fast optimized\" not implemented yet\n", opt);
+                  fprintf(stdout, "\"Fast optimized\" not implemented yet\n");
                   return DMTX_FAILURE;
                   break;
                case 'a':
@@ -257,45 +255,45 @@
             }
             break;
          case 'f':
-            options->format = *optarg;
-
-            if(options->format != 'n' && options->format != 'p' &&
-                  options->format != 'm') {
-               fprintf(stdout, "Invalid output format \"%c\"\n", options->format);
+            opt->format = *optarg;
+
+            if(opt->format != 'n' && opt->format != 'p' &&
+                  opt->format != 'm') {
+               fprintf(stdout, "Invalid output format \"%c\"\n", opt->format);
                return DMTX_FAILURE;
             }

             break;
          case 'o':
-            options->outputPath = optarg;
+            opt->outputPath = optarg;
             break;
          case 'p':
-            options->preview = *optarg;
-
-            if(options->preview != 'n' && options->preview != 'a' &&
-                  options->preview != 'c') {
-               fprintf(stdout, "Invalid preview format \"%c\"\n", options->preview);
+            opt->preview = *optarg;
+
+            if(opt->preview != 'n' && opt->preview != 'a' &&
+                  opt->preview != 'c') {
+               fprintf(stdout, "Invalid preview format \"%c\"\n", opt->preview);
                return DMTX_FAILURE;
             }

             break;
          case 'r':
-            err = StringToInt(&(options->rotate), optarg, &ptr);
+            err = StringToInt(&(opt->rotate), optarg, &ptr);
             if(err != DMTX_SUCCESS || *ptr != '\0')
                FatalError(1, _("Invalid rotation angle specified \"%s\""), optarg);
             break;
          case 's':
             /* Determine correct barcode size and/or shape */
             if(*optarg == 's') {
-               options->sizeIdx = DMTX_SYMBOL_SQUARE_AUTO;
+               opt->sizeIdx = DMTX_SYMBOL_SQUARE_AUTO;
             }
             else if(*optarg == 'r') {
-               options->sizeIdx = DMTX_SYMBOL_RECT_AUTO;
+               opt->sizeIdx = DMTX_SYMBOL_RECT_AUTO;
             }
             else {
                for(i = 0; i < DMTX_SYMBOL_SQUARE_COUNT + DMTX_SYMBOL_RECT_COUNT; i++) {
                   if(strncmp(optarg, symbolSizes[i], 8) == 0) {
-                     options->sizeIdx = i;
+                     opt->sizeIdx = i;
                      break;
                   }
                }
@@ -305,14 +303,14 @@

             break;
          case 'v':
-            options->verbose = 1;
+            opt->verbose = 1;
             break;
          case 'M':
-            options->mosaic = 1;
+            opt->mosaic = 1;
             break;
          case 'R':
-            err = StringToInt(&(options->dpi), optarg, &ptr);
-            if(err != DMTX_SUCCESS || options->dpi <= 0 || *ptr != '\0')
+            err = StringToInt(&(opt->dpi), optarg, &ptr);
+            if(err != DMTX_SUCCESS || opt->dpi <= 0 || *ptr != '\0')
                FatalError(1, _("Invalid dpi specified \"%s\""), optarg);
             break;
          case 'V':
@@ -326,7 +324,7 @@
       }
    }

-   options->inputPath = (*argvp)[optind];
+   opt->inputPath = (*argvp)[optind];

    /* XXX here test for incompatibility between options. For example you
       cannot specify dpi if PNM output is requested */
@@ -338,20 +336,14 @@
  *
  */
 static void
-ReadData(UserOptions *options, int *codeBufferSize, unsigned char *codeBuffer)
+ReadData(UserOptions *opt, int *codeBufferSize, unsigned char *codeBuffer)
 {
    int fd;

    /* Open file or stdin for reading */
-   if(options->inputPath == NULL) {
-      fd = 0;
-   }
-   else {
-      fd = open(options->inputPath, O_RDONLY);
-      if(fd == -1) {
-         FatalError(1, _("Error while opening file \"%s\""), options->inputPath);
-      }
-   }
+   fd = (opt->inputPath == NULL) ? 0 : open(opt->inputPath, O_RDONLY);
+   if(fd == -1)
+      FatalError(1, _("Error while opening file \"%s\""), opt->inputPath);

    /* Read input contents into buffer */
    *codeBufferSize = read(fd, codeBuffer, DMTXWRITE_BUFFER_SIZE);
@@ -434,7 +426,7 @@
  *
  */
 static void
-WriteImagePng(UserOptions *options, DmtxEncode *enc)
+WriteImagePng(UserOptions *opt, DmtxEncode *enc)
 {
    FILE *fp;
    int row;
@@ -444,9 +436,8 @@
    png_bytepp rowPointers;
    png_uint_32 pixelsPerMeter;

-   fp = (strncmp(options->outputPath, "-", 2) == 0) ? stdout :
-         fopen(options->outputPath, "wb");
-
+   /* Open file or stdin for writing */
+   fp = (opt->outputPath == NULL) ? stdout : fopen(opt->outputPath, "wb");
    if(fp == NULL) {
       perror(programName);
       exit(3);
@@ -490,8 +481,8 @@
          8, PNG_COLOR_TYPE_RGB, PNG_INTERLACE_NONE,
          PNG_COMPRESSION_TYPE_DEFAULT, PNG_FILTER_TYPE_DEFAULT);

-   if(options->dpi > 0) {
-      pixelsPerMeter = (png_uint_32)(39.3700787 * options->dpi + 0.5);
+   if(opt->dpi > 0) {
+      pixelsPerMeter = (png_uint_32)(39.3700787 * opt->dpi + 0.5);
       png_set_pHYs(pngPtr, infoPtr, pixelsPerMeter, pixelsPerMeter, PNG_RESOLUTION_METER);
    }

@@ -533,17 +524,14 @@
  *
  */
 static void
-WriteImagePnm(UserOptions *options, DmtxEncode *enc)
+WriteImagePnm(UserOptions *opt, DmtxEncode *enc)
 {
    int row, col;
    int width, height;
    FILE *fp;
    DmtxRgb rgb;

-   /* Flip rows top-to-bottom to account for PNM "top-left" origin */
-   fp = (strncmp(options->outputPath, "-", 2) == 0) ? stdout :
-         fopen(options->outputPath, "wb");
-
+   fp = (opt->outputPath == NULL) ? stdout : fopen(opt->outputPath, "wb");
    if(fp == NULL) {
       perror(programName);
       exit(3);
@@ -552,6 +540,7 @@
    width = dmtxImageGetProp(enc->image, DmtxPropWidth);
    height = dmtxImageGetProp(enc->image, DmtxPropHeight);

+   /* Flip rows top-to-bottom to account for PNM "top-left" origin */
    fprintf(fp, "P6 %d %d 255 ", width, height);
    for(row = height - 1; row >= 0; row--) {
       for(col = 0; col < width; col++) {


Complain if a process couldn't have been loaded from the initrd

--- kernel/kernel.c
+++ kernel/kernel.c
@@ -230,12 +230,16 @@

   if (executable){
     proc_new_from_memory("angle", false, (void *)bootinfo->initrd_addr + executable->offset, executable->size);
-  }
-
-  executable = sar_lookup(bootinfo->initrd_addr, "shades");
+  } else {
+    vga_printf("failed to load process 'angle' from the initrd!\n");
+  }
+
+  executable = sar_lookup(bootinfo->initrd_addr, "vga");

   if (executable){
-    proc_new_from_memory("shades", false, (void *)bootinfo->initrd_addr + executable->offset, executable->size);
+    proc_new_from_memory("vga", false, (void *)bootinfo->initrd_addr + executable->offset, executable->size);
+  } else {
+    vga_printf("failed to load process 'vga' from the initrd!\n");
   }

   vga_printf("take note of the flipping stuff in the top-left corner\n");


mac80211: mac80211: Check SN for deactivated mpaths

When processing a PREQ or PREP it's critical to use the incoming SN. If
that is improperly done routing loops and other types of badness can
happen. But the code was always processing path messages for deactivated
paths. This path fixes that so that if we have a valid SN then we use it
to verify that it is a message we can accept. For reference the relevant
section of the standard is 13.10.8.4 which doesn't address the deactivated
path case at all.

I also included a special case for when our peer reboots or restarts
networking. This is an important case because without it there can be a
very long delay before we accept path messages from that peer. It's also a
simple case and intimately associated with processing messages for
deactivated paths so I used one patch instead of two.

Signed-off-by: Alexis Green <2ea75bd67cdc143be4ba28156687013d9f9b2819@cococorp.com>
Signed-off-by: Johannes Berg <bff32994ff0f8d048f262a8388145a71b6071bfe@intel.com>


Revert "spi/api: extend with vendor specific configs"

This reverts commit a3a57b4db15a991085cfaf79b8308b2d9e120637.

There is _no_ need for any vendor specific gremlin bit anywhere.

Signed-off-by: Tomasz Bursztyka <ba81a3a719836727e6857ae83462b9f52ec41006@linux.intel.com>

--- include/spi.h
+++ include/spi.h
@@ -155,7 +155,6 @@
  *     cs_hold             [ 13 ]      - Hold on the CS line if possible.
  *     lock_on             [ 14 ]      - Keep resource locked for the caller.
  *     eeprom              [ 15 ]      - EEPROM mode.
- * @param vendor is a vendor specific bitfield
  * @param slave is the slave number from 0 to host controller slave limit.
  * @param cs is a valid pointer on a struct spi_cs_control is CS line is
  *    emulated through a gpio line, or NULL otherwise.
@@ -168,7 +167,6 @@

 	u32_t		frequency;
 	u16_t		operation;
-	u16_t		vendor;
 	u16_t		slave;

 	struct spi_cs_control *cs;


Improve documentation for most functions that return an object

--- include/ucl.h
+++ include/ucl.h
@@ -369,8 +369,9 @@

 /**
- * Delete key from `top` object returning the object deleted. This object is not
- * released
+ * Removes `key` from `top` object, returning the object that was removed. This
+ * object is not released, caller must unref the returned object when it is no
+ * longer needed.
  * @param top object
  * @param key key to remove
  * @param keylen length of the key (or 0 for NULL terminated keys)
@@ -380,8 +381,9 @@
 		size_t keylen) UCL_WARN_UNUSED_RESULT;

 /**
- * Delete key from `top` object returning the object deleted. This object is not
- * released
+ * Removes `key` from `top` object returning the object that was removed. This
+ * object is not released, caller must unref the returned object when it is no
+ * longer needed.
  * @param top object
  * @param key key to remove
  * @return removed object or NULL if object has not been found
@@ -390,8 +392,8 @@
 	UCL_WARN_UNUSED_RESULT;

 /**
- * Insert a object 'elt' to the hash 'top' and associate it with key 'key', if the specified key exist,
- * try to merge its content
+ * Insert a object 'elt' to the hash 'top' and associate it with key 'key', if
+ * the specified key exist, try to merge its content
  * @param top destination object (must be of type UCL_OBJECT)
  * @param elt element to insert (must NOT be NULL)
  * @param key key to associate with this object (either const or preallocated)
@@ -431,8 +433,9 @@
 		bool copy);

 /**
- * Removes an element `elt` from the array `top`. Caller must unref the returned object when it is not
- * needed.
+ * Removes an element `elt` from the array `top`, returning the object that was
+ * removed. This object is not released, caller must unref the returned object
+ * when it is no longer needed.
  * @param top array ucl object
  * @param elt element to remove
  * @return removed element or NULL if `top` is NULL or not an array
@@ -455,15 +458,25 @@
 UCL_EXTERN const ucl_object_t* ucl_array_tail (const ucl_object_t *top);

 /**
- * Removes the last element from the array `top`. Caller must unref the returned object when it is not
- * needed.
+ * Removes the last element from the array `top`, returning the object that was
+ * removed. This object is not released, caller must unref the returned object
+ * when it is no longer needed.
  * @param top array ucl object
  * @return removed element or NULL if `top` is NULL or not an array
  */
 UCL_EXTERN ucl_object_t* ucl_array_pop_last (ucl_object_t *top);

 /**
- * Return object identified by an index of the array `top`
+ * Removes the first element from the array `top`, returning the object that was
+ * removed. This object is not released, caller must unref the returned object
+ * when it is no longer needed.
+ * @param top array ucl object
+ * @return removed element or NULL if `top` is NULL or not an array
+ */
+UCL_EXTERN ucl_object_t* ucl_array_pop_first (ucl_object_t *top);
+
+/**
+ * Return object identified by index of the array `top`
  * @param top object to get a key from (must be of type UCL_ARRAY)
  * @param index array index to return
  * @return object at the specified index or NULL if index is not found
@@ -472,7 +485,9 @@
 		unsigned int index);

 /**
- * Replace an element in an array with a different element
+ * Replace an element in an array with a different element, returning the object
+ * that was replaced. This object is not released, caller must unref the
+ * returned object when it is no longer needed.
  * @param top destination object (must be of type UCL_ARRAY)
  * @param elt element to append (must NOT be NULL)
  * @param index array index in destination to overwrite with elt
@@ -483,18 +498,10 @@
 	unsigned int index);

 /**
- * Removes the first element from the array `top`. Caller must unref the returned object when it is not
- * needed.
- * @param top array ucl object
- * @return removed element or NULL if `top` is NULL or not an array
- */
-UCL_EXTERN ucl_object_t* ucl_array_pop_first (ucl_object_t *top);
-
-/**
  * Append a element to another element forming an implicit array
  * @param head head to append (may be NULL)
  * @param elt new element
- * @return true if element has been inserted
+ * @return the new implicit array
  */
 UCL_EXTERN ucl_object_t * ucl_elt_append (ucl_object_t *head,
 		ucl_object_t *elt);
@@ -588,7 +595,7 @@
  * Return object identified by a key in the specified object
  * @param obj object to get a key from (must be of type UCL_OBJECT)
  * @param key key to search
- * @return object matched the specified key or NULL if key is not found
+ * @return object matching the specified key or NULL if key was not found
  */
 UCL_EXTERN const ucl_object_t* ucl_object_find_key (const ucl_object_t *obj,
 		const char *key);
@@ -598,7 +605,7 @@
  * @param obj object to get a key from (must be of type UCL_OBJECT)
  * @param key key to search
  * @param klen length of a key
- * @return object matched the specified key or NULL if key is not found
+ * @return object matching the specified key or NULL if key was not found
  */
 UCL_EXTERN const ucl_object_t* ucl_object_find_keyl (const ucl_object_t *obj,
 		const char *key, size_t klen);
@@ -630,6 +637,7 @@
 /**
  * Increase reference count for an object
  * @param obj object to ref
+ * @return the referenced object
  */
 UCL_EXTERN ucl_object_t* ucl_object_ref (const ucl_object_t *obj);


printk: fixup declaration of kmsg_reasons

Move redundant 'const' after '*' to make pointer itself const

Signed-off-by: Namhyung Kim <5c915a589b3ddf58cebf14bec41bcc143b37ac3c@gmail.com>
Cc: Ingo Molnar <9dbbbf0688fedc85ad4da37637f1a64b8c718ee2@elte.hu>
Signed-off-by: Andrew Morton <5c1e68b099950c134891f0b6e179498a8ebe9cf9@linux-foundation.org>
Signed-off-by: Linus Torvalds <69652caca27c8b940640ad396ab71f93cacec34f@linux-foundation.org>

--- kernel/printk.c
+++ kernel/printk.c
@@ -1511,7 +1511,7 @@
 }
 EXPORT_SYMBOL_GPL(kmsg_dump_unregister);

-static const char const *kmsg_reasons[] = {
+static const char * const kmsg_reasons[] = {
 	[KMSG_DUMP_OOPS]	= "oops",
 	[KMSG_DUMP_PANIC]	= "panic",
 	[KMSG_DUMP_KEXEC]	= "kexec",


ws functions are not part of vrt, so mark them

Yet having the changelog in one place is useful

--- include/vrt.h
+++ include/vrt.h
@@ -111,11 +111,11 @@
  *	VRT_vcl_get added
  *	VRT_vcl_rel added
  *	VRT_fail added
- *	WS_Reset and WS_Snapshot signatures changed
- *	WS_Front added
- *	WS_ReserveLumps added
- *	WS_Inside added
- *	WS_Assert_Allocated added
+ *	[cache.h] WS_Reset and WS_Snapshot signatures changed
+ *	[cache.h] WS_Front added
+ *	[cache.h] WS_ReserveLumps added
+ *	[cache.h] WS_Inside added
+ *	[cache.h] WS_Assert_Allocated added
  * 5.0:
  *	Varnish 5.0 release "better safe than sorry" bump
  * 4.0:


[FIX] Some sign-related warnings with clang++

--- kernel/random.h
+++ kernel/random.h
@@ -145,7 +145,9 @@
     const auto size(c.size());
     assert(size);

-    return *std::next(c.begin(), between<decltype(size)>(0, size));
+    return *std::next(c.begin(),
+                      static_cast<typename C::difference_type>(
+                        between<decltype(size)>(0, size)));
   }

   ///
@@ -158,7 +160,9 @@
     const auto size(c.size());
     assert(size);

-    return *std::next(c.begin(), between<decltype(size)>(0, size));
+    return *std::next(c.begin(),
+                      static_cast<typename C::difference_type>(
+                        between<decltype(size)>(0, size)));
   }

   ///


application: mark menu/menubar getters as (transfer none)

Since they do not return a reference to the underlying GMenuModel.

--- gtk/gtkapplication.c
+++ gtk/gtkapplication.c
@@ -785,7 +785,7 @@
  * Returns the menu model that has been set with
  * g_application_set_app_menu().
  *
- * Returns: the application menu of @application
+ * Returns: (transfer none): the application menu of @application
  *
  * Since: 3.4
  */
@@ -833,7 +833,7 @@
  * Returns the menu model that has been set with
  * g_application_set_menubar().
  *
- * Returns: the menubar for windows of @application
+ * Returns: (transfer none): the menubar for windows of @application
  *
  * Since: 3.4
  */


Add reference to HowDoI and getting-started

--- gtk/gtkapplication.c
+++ gtk/gtkapplication.c
@@ -111,6 +111,10 @@
  * manager may not honor the inhibitor, but it can be expected to
  * inform the user about the negative consequences of ending the
  * session while inhibitors are present.
+ *
+ * ## See Also ## {#seealso}
+ * HowDoI: [Using GtkApplication] (https://wiki.gnome.org/HowDoI/GtkApplication)
+ * [Getting Started with GTK+: Basics] (https://developer.gnome.org/gtk3/stable/gtk-getting-started.html#id-1.2.3.3)
  */

 enum {


GtkCssProvider: Add a default border color for insensitive elements.

--- gtk/gtkcssprovider.c
+++ gtk/gtkcssprovider.c
@@ -3465,6 +3465,7 @@
         "}\n"
         "\n"
         "*:insensitive {\n"
+        "  border-color: shade (@bg_color, 0.7);\n"
         "  background-color: shade (@bg_color, 0.9);\n"
         "  color: shade (@bg_color, 0.7);\n"
         "}\n"


[CCID2]: Sequence number wraparound issues

This replaces several uses of standard arithmetic with the DCCP
sequence number arithmetic functions. The problem here is that the
sequence number wrap-around was not taken into consideration.

 * Condition "seqp->ccid2s_seq <= prev->ccid2s_seq" has been replaced
   by

   	dccp_delta_seqno(seqp->ccid2s_seq, prev->ccid2s_seq) >= 0

   since if seqp is `before' prev, then the delta_seqno() is positive.

 * The test whether sequence numbers `a' and `b' are consecutive has
   the form

   	dccp_delta_seqno(a, b) == 1

 * Increment of ccid2hctx_rpseq could be done using dccp_inc_seqno(),
   but since here the incremented ccid2hctx_rpseq == seqno, used
   assignment instead.

Signed-off-by: Gerrit Renker <3b97070d46ccd66422a8e7b83e6967ed84780538@erg.abdn.ac.uk>
Signed-off-by: Arnaldo Carvalho de Melo <293abb6b76d7791c0732cc517d38c4b5c734b87f@redhat.com>
Signed-off-by: David S. Miller <fe08d3c717adf2ae63592e4c9aec6e3e404d8e3e@davemloft.net>

--- net/dccp/ccids/ccid2.c
+++ net/dccp/ccids/ccid2.c
@@ -59,7 +59,8 @@
 				pipe++;

 			/* packets are sent sequentially */
-			BUG_ON(seqp->ccid2s_seq <= prev->ccid2s_seq);
+			BUG_ON(dccp_delta_seqno(seqp->ccid2s_seq,
+						prev->ccid2s_seq ) >= 0);
 			BUG_ON(time_before(seqp->ccid2s_sent,
 					   prev->ccid2s_sent));

@@ -562,8 +563,8 @@
 		hctx->ccid2hctx_rpseq = seqno;
 	} else {
 		/* check if packet is consecutive */
-		if ((hctx->ccid2hctx_rpseq + 1) == seqno)
-			hctx->ccid2hctx_rpseq++;
+		if (dccp_delta_seqno(hctx->ccid2hctx_rpseq, seqno) == 1)
+			hctx->ccid2hctx_rpseq = seqno;
 		/* it's a later packet */
 		else if (after48(seqno, hctx->ccid2hctx_rpseq)) {
 			hctx->ccid2hctx_rpdupack++;


Declare transition and border-image properties to be writeonly

We don't make the types of their values public, so getting their
values is useless and will leak.

--- gtk/gtkcssprovider.c
+++ gtk/gtkcssprovider.c
@@ -635,7 +635,7 @@
  *       <row>
  *         <entry>border-image</entry>
  *         <entry><literallayout>border image (see above)</literallayout></entry>
- *         <entry></entry>
+ *         <entry>internal use only</entry>
  *         <entry><literallayout>border-image: url("/path/to/image.png") 3 4 3 4 stretch;
  * border-image: url("/path/to/image.png") 3 4 4 3 repeat stretch;</literallayout>
  *         </entry>
@@ -643,7 +643,7 @@
  *       <row>
  *         <entry>transition</entry>
  *         <entry>transition (see above)</entry>
- *         <entry></entry>
+ *         <entry>internal use only</entry>
  *         <entry><literallayout>transition: 150ms ease-in-out;
  * transition: 1s linear loop;</literallayout>
  *         </entry>


net: ipv4/ip_sockglue.c cleanups

net: ipv4/ip_sockglue.c cleanups

Pure cleanups

Signed-off-by: Eric Dumazet <a0baddf32b28d2f9429941ed4af2fe636e210591@gmail.com>
Signed-off-by: David S. Miller <fe08d3c717adf2ae63592e4c9aec6e3e404d8e3e@davemloft.net>

--- net/ipv4/ip_sockglue.c
+++ net/ipv4/ip_sockglue.c
@@ -157,38 +157,39 @@
 	/* Ordered by supposed usage frequency */
 	if (flags & 1)
 		ip_cmsg_recv_pktinfo(msg, skb);
-	if ((flags>>=1) == 0)
+	if ((flags >>= 1) == 0)
 		return;

 	if (flags & 1)
 		ip_cmsg_recv_ttl(msg, skb);
-	if ((flags>>=1) == 0)
+	if ((flags >>= 1) == 0)
 		return;

 	if (flags & 1)
 		ip_cmsg_recv_tos(msg, skb);
-	if ((flags>>=1) == 0)
+	if ((flags >>= 1) == 0)
 		return;

 	if (flags & 1)
 		ip_cmsg_recv_opts(msg, skb);
-	if ((flags>>=1) == 0)
+	if ((flags >>= 1) == 0)
 		return;

 	if (flags & 1)
 		ip_cmsg_recv_retopts(msg, skb);
-	if ((flags>>=1) == 0)
+	if ((flags >>= 1) == 0)
 		return;

 	if (flags & 1)
 		ip_cmsg_recv_security(msg, skb);

-	if ((flags>>=1) == 0)
+	if ((flags >>= 1) == 0)
 		return;
 	if (flags & 1)
 		ip_cmsg_recv_dstaddr(msg, skb);

 }
+EXPORT_SYMBOL(ip_cmsg_recv);

 int ip_cmsg_send(struct net *net, struct msghdr *msg, struct ipcm_cookie *ipc)
 {
@@ -203,7 +204,8 @@
 		switch (cmsg->cmsg_type) {
 		case IP_RETOPTS:
 			err = cmsg->cmsg_len - CMSG_ALIGN(sizeof(struct cmsghdr));
-			err = ip_options_get(net, &ipc->opt, CMSG_DATA(cmsg), err < 40 ? err : 40);
+			err = ip_options_get(net, &ipc->opt, CMSG_DATA(cmsg),
+					     err < 40 ? err : 40);
 			if (err)
 				return err;
 			break;
@@ -238,7 +240,8 @@
 struct ip_ra_chain *ip_ra_chain;
 DEFINE_RWLOCK(ip_ra_lock);

-int ip_ra_control(struct sock *sk, unsigned char on, void (*destructor)(struct sock *))
+int ip_ra_control(struct sock *sk, unsigned char on,
+		  void (*destructor)(struct sock *))
 {
 	struct ip_ra_chain *ra, *new_ra, **rap;

@@ -248,7 +251,7 @@
 	new_ra = on ? kmalloc(sizeof(*new_ra), GFP_KERNEL) : NULL;

 	write_lock_bh(&ip_ra_lock);
-	for (rap = &ip_ra_chain; (ra=*rap) != NULL; rap = &ra->next) {
+	for (rap = &ip_ra_chain; (ra = *rap) != NULL; rap = &ra->next) {
 		if (ra->sk == sk) {
 			if (on) {
 				write_unlock_bh(&ip_ra_lock);
@@ -416,7 +419,8 @@
 	/* Reset and regenerate socket error */
 	spin_lock_bh(&sk->sk_error_queue.lock);
 	sk->sk_err = 0;
-	if ((skb2 = skb_peek(&sk->sk_error_queue)) != NULL) {
+	skb2 = skb_peek(&sk->sk_error_queue);
+	if (skb2 != NULL) {
 		sk->sk_err = SKB_EXT_ERR(skb2)->ee.ee_errno;
 		spin_unlock_bh(&sk->sk_error_queue.lock);
 		sk->sk_error_report(sk);
@@ -431,8 +435,8 @@

 /*
- *	Socket option code for IP. This is the end of the line after any TCP,UDP etc options on
- *	an IP socket.
+ *	Socket option code for IP. This is the end of the line after any
+ *	TCP,UDP etc options on an IP socket.
  */

 static int do_ip_setsockopt(struct sock *sk, int level,
@@ -474,7 +478,7 @@
 	switch (optname) {
 	case IP_OPTIONS:
 	{
-		struct ip_options * opt = NULL;
+		struct ip_options *opt = NULL;
 		if (optlen > 40 || optlen < 0)
 			goto e_inval;
 		err = ip_options_get_from_user(sock_net(sk), &opt,
@@ -556,9 +560,9 @@
 		}
 		break;
 	case IP_TTL:
-		if (optlen<1)
-			goto e_inval;
-		if (val != -1 && (val < 1 || val>255))
+		if (optlen < 1)
+			goto e_inval;
+		if (val != -1 && (val < 0 || val > 255))
 			goto e_inval;
 		inet->uc_ttl = val;
 		break;
@@ -570,7 +574,7 @@
 		inet->hdrincl = val ? 1 : 0;
 		break;
 	case IP_MTU_DISCOVER:
-		if (val<0 || val>3)
+		if (val < 0 || val > 3)
 			goto e_inval;
 		inet->pmtudisc = val;
 		break;
@@ -582,7 +586,7 @@
 	case IP_MULTICAST_TTL:
 		if (sk->sk_type == SOCK_STREAM)
 			goto e_inval;
-		if (optlen<1)
+		if (optlen < 1)
 			goto e_inval;
 		if (val == -1)
 			val = 1;
@@ -591,7 +595,7 @@
 		inet->mc_ttl = val;
 		break;
 	case IP_MULTICAST_LOOP:
-		if (optlen<1)
+		if (optlen < 1)
 			goto e_inval;
 		inet->mc_loop = !!val;
 		break;
@@ -613,7 +617,8 @@
 		} else {
 			memset(&mreq, 0, sizeof(mreq));
 			if (optlen >= sizeof(struct in_addr) &&
-			    copy_from_user(&mreq.imr_address, optval, sizeof(struct in_addr)))
+			    copy_from_user(&mreq.imr_address, optval,
+					   sizeof(struct in_addr)))
 				break;
 		}

@@ -677,7 +682,6 @@
 	}
 	case IP_MSFILTER:
 	{
-		extern int sysctl_igmp_max_msf;
 		struct ip_msfilter *msf;

 		if (optlen < IP_MSFILTER_SIZE(0))
@@ -831,7 +835,6 @@
 	}
 	case MCAST_MSFILTER:
 	{
-		extern int sysctl_igmp_max_msf;
 		struct sockaddr_in *psin;
 		struct ip_msfilter *msf = NULL;
 		struct group_filter *gsf = NULL;
@@ -849,9 +852,9 @@
 			break;
 		}
 		err = -EFAULT;
-		if (copy_from_user(gsf, optval, optlen)) {
+		if (copy_from_user(gsf, optval, optlen))
 			goto mc_msf_out;
-		}
+
 		/* numsrc >= (4G-140)/128 overflow in 32 bits */
 		if (gsf->gf_numsrc >= 0x1ffffff ||
 		    gsf->gf_numsrc > sysctl_igmp_max_msf) {
@@ -879,7 +882,7 @@
 		msf->imsf_fmode = gsf->gf_fmode;
 		msf->imsf_numsrc = gsf->gf_numsrc;
 		err = -EADDRNOTAVAIL;
-		for (i=0; i<gsf->gf_numsrc; ++i) {
+		for (i = 0; i < gsf->gf_numsrc; ++i) {
 			psin = (struct sockaddr_in *)&gsf->gf_slist[i];

 			if (psin->sin_family != AF_INET)
@@ -890,7 +893,7 @@
 		gsf = NULL;

 		err = ip_mc_msfilter(sk, msf, ifindex);
-	mc_msf_out:
+mc_msf_out:
 		kfree(msf);
 		kfree(gsf);
 		break;
@@ -900,7 +903,7 @@
 		break;

 	case IP_FREEBIND:
-		if (optlen<1)
+		if (optlen < 1)
 			goto e_inval;
 		inet->freebind = !!val;
 		break;
@@ -957,6 +960,7 @@
 #endif
 	return err;
 }
+EXPORT_SYMBOL(ip_setsockopt);

 #ifdef CONFIG_COMPAT
 int compat_ip_setsockopt(struct sock *sk, int level, int optname,
@@ -986,13 +990,12 @@
 #endif
 	return err;
 }
-
 EXPORT_SYMBOL(compat_ip_setsockopt);
 #endif

 /*
- *	Get the options. Note for future reference. The GET of IP options gets the
- *	_received_ ones. The set sets the _sent_ ones.
+ *	Get the options. Note for future reference. The GET of IP options gets
+ *	the _received_ ones. The set sets the _sent_ ones.
  */

 static int do_ip_getsockopt(struct sock *sk, int level, int optname,
@@ -1143,7 +1146,8 @@
 			return -EFAULT;
 		}
 		err = ip_mc_gsfget(sk, &gsf,
-				   (struct group_filter __user *)optval, optlen);
+				   (struct group_filter __user *)optval,
+				   optlen);
 		release_sock(sk);
 		return err;
 	}
@@ -1187,7 +1191,7 @@
 	}
 	release_sock(sk);

-	if (len < sizeof(int) && len > 0 && val>=0 && val<=255) {
+	if (len < sizeof(int) && len > 0 && val >= 0 && val <= 255) {
 		unsigned char ucval = (unsigned char)val;
 		len = 1;
 		if (put_user(len, optlen))
@@ -1230,6 +1234,7 @@
 #endif
 	return err;
 }
+EXPORT_SYMBOL(ip_getsockopt);

 #ifdef CONFIG_COMPAT
 int compat_ip_getsockopt(struct sock *sk, int level, int optname,
@@ -1262,11 +1267,5 @@
 #endif
 	return err;
 }
-
 EXPORT_SYMBOL(compat_ip_getsockopt);
 #endif
-
-EXPORT_SYMBOL(ip_cmsg_recv);
-
-EXPORT_SYMBOL(ip_getsockopt);
-EXPORT_SYMBOL(ip_setsockopt);


selector: Redo from list to array

selector: Redo from list to array

Should save ~30% of memory

--- gtk/gtkcssselector.c
+++ gtk/gtkcssselector.c
@@ -19,6 +19,8 @@

 #include "gtkcssselectorprivate.h"

+#include <string.h>
+
 #include "gtkcssprovider.h"
 #include "gtkstylecontextprivate.h"

@@ -42,7 +44,6 @@
 struct _GtkCssSelector
 {
   const GtkCssSelectorClass *class;       /* type of check this selector does */
-  GtkCssSelector            *previous;    /* link to next element in selector or NULL if last */
   gconstpointer              data;        /* data for matching:
                                              - interned string for CLASS, NAME and ID
                                              - GUINT_TO_POINTER() for PSEUDOCLASS_REGION/STATE */
@@ -63,7 +64,9 @@
 static const GtkCssSelector *
 gtk_css_selector_previous (const GtkCssSelector *selector)
 {
-  return selector->previous;
+  selector = selector + 1;
+
+  return selector->class ? selector : NULL;
 }

 /* ANY */
@@ -445,16 +448,35 @@

 /* API */

+static guint
+gtk_css_selector_size (const GtkCssSelector *selector)
+{
+  guint size = 0;
+
+  while (selector)
+    {
+      selector = gtk_css_selector_previous (selector);
+      size++;
+    }
+
+  return size;
+}
+
 static GtkCssSelector *
 gtk_css_selector_new (const GtkCssSelectorClass *class,
-                      GtkCssSelector            *previous,
+                      GtkCssSelector            *selector,
                       gconstpointer              data)
 {
-  GtkCssSelector *selector;
-
-  selector = g_slice_new0 (GtkCssSelector);
+  guint size;
+
+  size = gtk_css_selector_size (selector);
+  selector = g_realloc (selector, sizeof (GtkCssSelector) * (size + 1) + sizeof (gpointer));
+  if (size == 0)
+    selector[1].class = NULL;
+  else
+    memmove (selector + 1, selector, sizeof (GtkCssSelector) * size + sizeof (gpointer));
+
   selector->class = class;
-  selector->previous = previous;
   selector->data = data;

   return selector;
@@ -655,9 +677,9 @@

 static GtkCssSelector *
 parse_simple_selector (GtkCssParser   *parser,
-                       GtkCssSelector *previous)
-{
-  GtkCssSelector *selector = previous;
+                       GtkCssSelector *selector)
+{
+  guint size = gtk_css_selector_size (selector);

   selector = try_parse_name (parser, selector);

@@ -668,12 +690,12 @@
         selector = parse_selector_class (parser, selector);
       else if (_gtk_css_parser_try (parser, ":", FALSE))
         selector = parse_selector_pseudo_class (parser, selector);
-      else if (selector == previous)
+      else if (gtk_css_selector_size (selector) == size)
         {
           _gtk_css_parser_error (parser, "Expected a valid selector");
           if (selector)
             _gtk_css_selector_free (selector);
-          selector = NULL;
+          return NULL;
         }
       else
         break;
@@ -709,10 +731,7 @@
 {
   g_return_if_fail (selector != NULL);

-  if (selector->previous)
-    _gtk_css_selector_free (selector->previous);
-
-  g_slice_free (GtkCssSelector, selector);
+  g_free (selector);
 }

 void


liitle refactor

liitle refactor

--- Classes/main.c
+++ Classes/main.c
@@ -37,16 +37,11 @@
     return result;
 }

-ChatData *createWithNickname(RString *nick, RString *chatRoom) {
-    ChatData *result = allocator(ChatData);
-    result->nickname = nick;
-    result->chatRoom = chatRoom;
-    return result;
-}
+#define ContextChatData ((ChatData*)object->context)

 rbool nickNameFinder(ChatData *context, RTCPDataStruct *object, size_t iterator) {
-    if($(((ChatData*)object->context)->chatRoom, m(isEqualTo, RCString)), context->chatRoom)) {
-        if($(((ChatData*)object->context)->nickname, m(isEqualTo, RCString)), context->nickname)) {
+    if($(ContextChatData->chatRoom,     m(isEqualTo, RCString)), context->chatRoom)) {
+        if($(ContextChatData->nickname, m(isEqualTo, RCString)), context->nickname)) {
             return no;
         }
     }
@@ -54,19 +49,19 @@
 }

 rbool ChatRoomPredicate(RString *context, RTCPDataStruct *object, size_t iterator) {
-    if($(((ChatData*)object->context)->chatRoom, m(isEqualTo, RCString)), context)) {
+    if($(ContextChatData->chatRoom, m(isEqualTo, RCString)), context)) {
        return yes;
     }
     return no;
 }

 rbool ChatRoomListEnumerator(RString *list, RTCPDataStruct *object, size_t iterator) {
-    if(((ChatData*)object->context)->nickname != nil) {
+    if(ContextChatData->nickname != nil) {
         RString *number = stringWithFormat("%lu", iterator);

         $(list, m(concatenate, RCString)), number);
         $(list, m(concatenate, RCString)), RS(" - "));
-        $(list, m(concatenate, RCString)), ((ChatData*)object->context)->nickname);
+        $(list, m(concatenate, RCString)), ContextChatData->nickname);
         $(list, m(concatenate, RCString)), RS("\n"));

         deleter(number, RString);


Give access to fInfos data member. Fixes issue #94297.

git-svn-id: acec3fd5b7ea1eb9e79d6329d318e8118ee2e14f@44490 27541ba8-7e3a-0410-8455-c3a389f83636

--- net/net/inc/TMessage.h
+++ net/net/inc/TMessage.h
@@ -44,7 +44,7 @@
 friend class TXSocket;

 private:
-   TList   *fInfos;       //Array of TStreamerInfo used in WriteObject
+   TList   *fInfos;       //List of TStreamerInfo used in WriteObject
    TBits    fBitsPIDs;    //Array of bits to mark the TProcessIDs uids written to the message
    UInt_t   fWhat;        //Message type
    TClass  *fClass;       //If message is kMESS_OBJECT pointer to object's class
@@ -82,6 +82,7 @@

    void     EnableSchemaEvolution(Bool_t enable = kTRUE) { fEvolution = enable; }
    Bool_t   UsesSchemaEvolution() const { return fEvolution; }
+   TList   *GetStreamerInfos() const { return fInfos; }
    Int_t    GetCompressionAlgorithm() const;
    Int_t    GetCompressionLevel() const;
    Int_t    GetCompressionSettings() const;


cssselector: Support :not() for position pseudoclasses

This is simple now that the latest commit used the macro and
autogenerates the SelectorClass to use.

--- gtk/gtkcssselector.c
+++ gtk/gtkcssselector.c
@@ -1536,14 +1536,6 @@
 {
   int a, b;

-  if (negate)
-    {
-      _gtk_css_parser_error (parser, "position pseudoclases not yet supported for :not()");
-      if (selector)
-        _gtk_css_selector_free (selector);
-      return NULL;
-    }
-
   if (!_gtk_css_parser_try (parser, "(", TRUE))
     {
       _gtk_css_parser_error (parser, "Missing opening bracket for pseudo-class");
@@ -1648,7 +1640,8 @@
       return NULL;
     }

-  selector = gtk_css_selector_new (&GTK_CSS_SELECTOR_PSEUDOCLASS_POSITION,
+  selector = gtk_css_selector_new (negate ? &GTK_CSS_SELECTOR_NOT_PSEUDOCLASS_POSITION
+                                          : &GTK_CSS_SELECTOR_PSEUDOCLASS_POSITION,
                                    selector);
   selector->position.type = type;
   selector->position.a = a;
@@ -1731,16 +1724,10 @@
                                                selector);
               selector->state.state = pseudo_classes[i].state_flag;
             }
-          else if (negate)
-            {
-              _gtk_css_parser_error (parser, "position pseudoclases not yet supported for :not()");
-              if (selector)
-                _gtk_css_selector_free (selector);
-              return NULL;
-            }
           else
             {
-              selector = gtk_css_selector_new (&GTK_CSS_SELECTOR_PSEUDOCLASS_POSITION,
+              selector = gtk_css_selector_new (negate ? &GTK_CSS_SELECTOR_NOT_PSEUDOCLASS_POSITION
+                                                      : &GTK_CSS_SELECTOR_PSEUDOCLASS_POSITION,
                                                selector);
               selector->position.type = pseudo_classes[i].position_type;
               selector->position.a = pseudo_classes[i].position_a;


SUNRPC: Use correct argument type in memcpy()

Noticed by Tom Talpey <tmt@netapp.com>:

OBTW, there's a nit on that memcpy, too. The r_addr is an array, so

memcpy(&map->r_addr

is passing the address of the array as a char **. It's the same as
map->r_addr, but technically the wrong type.

Signed-off-by: Chuck Lever <e7d8216bf9b1956703857d0050bd04192118f43d@oracle.com>
Signed-off-by: Trond Myklebust <6a1f9db795c9fc44be97d66ab114c53193bd3d13@netapp.com>

--- net/sunrpc/rpcb_clnt.c
+++ net/sunrpc/rpcb_clnt.c
@@ -410,7 +410,7 @@
 	map->r_xprt = xprt_get(xprt);
 	map->r_netid = (xprt->prot == IPPROTO_TCP) ? RPCB_NETID_TCP :
 						   RPCB_NETID_UDP;
-	memcpy(&map->r_addr,
+	memcpy(map->r_addr,
 	       rpc_peeraddr2str(rpcb_clnt, RPC_DISPLAY_UNIVERSAL_ADDR),
 	       sizeof(map->r_addr));
 	map->r_owner = RPCB_OWNER_STRING;	/* ignored for GETADDR */


GtkFontChooser: Fixing mouse scroll zooming behaviour for the preview and the size controls

--- gtk/gtkfontchooser.c
+++ gtk/gtkfontchooser.c
@@ -336,16 +336,13 @@
   GtkAdjustment *slider_adj = gtk_range_get_adjustment (GTK_RANGE (priv->size_slider));

   /* We ignore the slider value change callback for both of this set_value call */
+  priv->ignore_slider = TRUE;
   if (size < gtk_adjustment_get_lower (slider_adj))
-    {
-      priv->ignore_slider = TRUE;
-      gtk_adjustment_set_value (slider_adj, gtk_adjustment_get_lower (slider_adj));
-    }
+    gtk_adjustment_set_value (slider_adj, gtk_adjustment_get_lower (slider_adj));
   else if (size > gtk_adjustment_get_upper (slider_adj))
-    {
-      priv->ignore_slider = TRUE;
-      gtk_adjustment_set_value (slider_adj, gtk_adjustment_get_upper (slider_adj));
-    }
+    gtk_adjustment_set_value (slider_adj, gtk_adjustment_get_upper (slider_adj));
+  else
+    gtk_adjustment_set_value (slider_adj, size);

   priv->size = ((gint)gtk_adjustment_get_value (adjustment)) * PANGO_SCALE;

@@ -424,6 +421,24 @@
   g_free (family_name);
   g_object_unref ((gpointer)face);
   pango_font_description_free(desc);
+}
+
+gboolean
+zoom_preview_cb (GtkWidget *scrolled_window, GdkEventScroll *event, gpointer data)
+{
+  GtkFontSelectionPrivate *priv = (GtkFontSelectionPrivate*)data;
+
+  GtkAdjustment *adj = gtk_spin_button_get_adjustment (GTK_SPIN_BUTTON (priv->size_spin));
+
+  if (event->direction == GDK_SCROLL_UP || event->direction == GDK_SCROLL_RIGHT)
+    gtk_adjustment_set_value (adj,
+                              gtk_adjustment_get_value (adj) +
+                              gtk_adjustment_get_step_increment (adj));
+  else if (event->direction == GDK_SCROLL_DOWN || event->direction == GDK_SCROLL_LEFT)
+    gtk_adjustment_set_value (adj,
+                              gtk_adjustment_get_value (adj) -
+                              gtk_adjustment_get_step_increment (adj));
+  return TRUE;
 }

 static void
@@ -487,12 +502,10 @@
   /* Setting the size requests for various widgets */
   gtk_widget_set_size_request (GTK_WIDGET (fontsel), 462, 462);
   gtk_widget_set_size_request (scrolled_win,  -1, PREVIEW_HEIGHT);
-  gtk_widget_set_size_request (priv->preview, -1, PREVIEW_HEIGHT - 6);
-
-  /* Unset the frame on the preview entry and set a shadow in the scrolled window */
+  gtk_widget_set_size_request (priv->preview, -1, PREVIEW_HEIGHT);
+
+  /* Unset the frame on the preview entry */
   gtk_entry_set_has_frame (GTK_ENTRY (priv->preview), FALSE);
-  gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolled_win),
-                                       GTK_SHADOW_OUT);

   /* Packing the slider and the spin in a hbox */
   size_controls = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
@@ -556,6 +569,9 @@

   /* Zoom on preview scroll*/
   g_signal_connect (G_OBJECT (scrolled_win),      "scroll-event",
+                    G_CALLBACK (zoom_preview_cb), priv);
+
+  g_signal_connect (G_OBJECT (priv->size_slider), "scroll-event",
                     G_CALLBACK (zoom_preview_cb), priv);

   set_range_marks (priv->size_slider, (gint*)font_sizes, FONT_SIZES_LENGTH);
@@ -994,10 +1010,10 @@
 gchar *
 gtk_font_selection_get_font_name (GtkFontSelection *fontsel)
 {
-  if (!fontsel->family)
+  if (!fontsel->priv->family)
     return NULL;

-  return g_strdup (pango_font_family_get_name (fontsel->family));
+  return g_strdup (pango_font_family_get_name (fontsel->priv->family));
 }

 /* This sets the current font, then selecting the appropriate list rows. */


xfrm: Fix replay notification for esn.

xfrm: Fix replay notification for esn.

We may miscalculate the sequence number difference from the
last time we send a notification if a sequence number wrap
occured in the meantime. We fix this by adding a separate
replay notify function for esn. Here we take the high bits
of the sequence number into account to calculate the
difference.

Signed-off-by: Steffen Klassert <66deb1d63f85161cc287ce2bac0c65cb5ae958a7@secunet.com>

--- net/xfrm/xfrm_replay.c
+++ net/xfrm/xfrm_replay.c
@@ -334,6 +334,72 @@
 		x->xflags &= ~XFRM_TIME_DEFER;
 }

+static void xfrm_replay_notify_esn(struct xfrm_state *x, int event)
+{
+	u32 seq_diff, oseq_diff;
+	struct km_event c;
+	struct xfrm_replay_state_esn *replay_esn = x->replay_esn;
+	struct xfrm_replay_state_esn *preplay_esn = x->preplay_esn;
+
+	/* we send notify messages in case
+	 *  1. we updated on of the sequence numbers, and the seqno difference
+	 *     is at least x->replay_maxdiff, in this case we also update the
+	 *     timeout of our timer function
+	 *  2. if x->replay_maxage has elapsed since last update,
+	 *     and there were changes
+	 *
+	 *  The state structure must be locked!
+	 */
+
+	switch (event) {
+	case XFRM_REPLAY_UPDATE:
+		if (!x->replay_maxdiff)
+			break;
+
+		if (replay_esn->seq_hi == preplay_esn->seq_hi)
+			seq_diff = replay_esn->seq - preplay_esn->seq;
+		else
+			seq_diff = UINT_MAX - preplay_esn->seq
+				   + replay_esn->seq;
+
+		if (replay_esn->oseq_hi == preplay_esn->oseq_hi)
+			oseq_diff = replay_esn->oseq - preplay_esn->oseq;
+		else
+			oseq_diff = UINT_MAX - preplay_esn->oseq
+				    + replay_esn->oseq;
+
+		if (seq_diff < x->replay_maxdiff &&
+		    oseq_diff < x->replay_maxdiff) {
+
+			if (x->xflags & XFRM_TIME_DEFER)
+				event = XFRM_REPLAY_TIMEOUT;
+			else
+				return;
+		}
+
+		break;
+
+	case XFRM_REPLAY_TIMEOUT:
+		if (memcmp(x->replay_esn, x->preplay_esn,
+			   xfrm_replay_state_esn_len(replay_esn)) == 0) {
+			x->xflags |= XFRM_TIME_DEFER;
+			return;
+		}
+
+		break;
+	}
+
+	memcpy(x->preplay_esn, x->replay_esn,
+	       xfrm_replay_state_esn_len(replay_esn));
+	c.event = XFRM_MSG_NEWAE;
+	c.data.aevent = event;
+	km_state_notify(x, &c);
+
+	if (x->replay_maxage &&
+	    !mod_timer(&x->rtimer, jiffies + x->replay_maxage))
+		x->xflags &= ~XFRM_TIME_DEFER;
+}
+
 static int xfrm_replay_overflow_esn(struct xfrm_state *x, struct sk_buff *skb)
 {
 	int err = 0;
@@ -510,7 +576,7 @@
 	.advance	= xfrm_replay_advance_esn,
 	.check		= xfrm_replay_check_esn,
 	.recheck	= xfrm_replay_recheck_esn,
-	.notify		= xfrm_replay_notify_bmp,
+	.notify		= xfrm_replay_notify_esn,
 	.overflow	= xfrm_replay_overflow_esn,
 };


gtksearchentry: Provide an accessible name

https://bugzilla.gnome.org/show_bug.cgi?id=706014

--- gtk/gtksearchentry.c
+++ gtk/gtksearchentry.c
@@ -27,6 +27,7 @@

 #include "config.h"

+#include "gtkaccessible.h"
 #include "gtksearchentry.h"
 #include "gtkmarshalers.h"
 #include "gtkintl.h"
@@ -226,11 +227,17 @@
 static void
 gtk_search_entry_init (GtkSearchEntry *entry)
 {
+  AtkObject *atk_obj;
+
   g_object_set (entry,
                 "primary-icon-name", "edit-find-symbolic",
                 "primary-icon-activatable", FALSE,
                 "primary-icon-sensitive", FALSE,
                 NULL);
+
+  atk_obj = gtk_widget_get_accessible (GTK_WIDGET (entry));
+  if (GTK_IS_ACCESSIBLE (atk_obj))
+    atk_object_set_name (atk_obj, _("Search"));
 }

 /**


git-describe: use find_unique_abbrev()

git-describe: use find_unique_abbrev()

Just in case 8 hexadecimal digits are not enough.  We could use
shorter default if we wanted to.

Signed-off-by: Junio C Hamano <dc50d1021234060e53ec42a77d526afa2fe07479@cox.net>

--- describe.c
+++ describe.c
@@ -95,7 +95,8 @@
 		struct commit *c = pop_most_recent_commit(&list, SEEN);
 		n = match(c);
 		if (n) {
-			printf("%s-g%.8s\n", n->path, sha1_to_hex(cmit->object.sha1));
+			printf("%s-g%s\n", n->path,
+			       find_unique_abbrev(cmit->object.sha1, 8));
 			return;
 		}
 	}


renamed constant representing max length of txt repr for input molecule

--- chemicalite.c
+++ chemicalite.c
@@ -8,7 +8,7 @@

 #include "rdkit_adapter.h"

-static const int MAX_TXT_LENGTH = 300;
+static const int MAX_TXTMOL_LENGTH = 300;

 /*
 ** convert SMILES string into a blob-molecule
@@ -25,7 +25,7 @@

   /* verify the string is not too big for a SMILES */
   int len = sqlite3_value_bytes(argv[0]);
-  if (len > MAX_TXT_LENGTH) {
+  if (len > MAX_TXTMOL_LENGTH) {
     sqlite3_result_error_toobig(ctx);
     return;
   }


Renamed Connection to ConnectionBase.

Renamed Connection to ConnectionBase.

And using Connection = std::shared_ptr<ConnectionBase>

--- sigs.h
+++ sigs.h
@@ -10,7 +10,7 @@
 #include <initializer_list>

 namespace sigs {
-  class Connection {
+  class ConnectionBase {
     template <typename>
     friend class Signal;

@@ -23,7 +23,7 @@
     std::function<void()> deleter;
   };

-  using ConnPtr = std::shared_ptr<Connection>;
+  using Connection = std::shared_ptr<ConnectionBase>;

   template <typename>
   class Signal;
@@ -34,22 +34,22 @@

     class Entry {
     public:
-      Entry(const Slot &slot, ConnPtr conn)
+      Entry(const Slot &slot, Connection conn)
         : slot(slot), conn(conn), signal(nullptr) { }

-      Entry(Slot &&slot, ConnPtr conn)
+      Entry(Slot &&slot, Connection conn)
         : slot(std::move(slot)), conn(conn), signal(nullptr) { }

-      Entry(Signal *signal, ConnPtr conn)
+      Entry(Signal *signal, Connection conn)
         : conn(conn), signal(signal) { }

       const Slot &getSlot() const { return slot; }
       Signal *getSignal() const { return signal; }
-      ConnPtr getConn() const { return conn; }
+      Connection getConn() const { return conn; }

     private:
       Slot slot;
-      ConnPtr conn;
+      Connection conn;
       Signal *signal;
     };

@@ -88,14 +88,14 @@
     Signal(Signal &&rhs) = default;
     Signal &operator=(Signal &&rhs) = default;

-    ConnPtr connect(const Slot &slot) {
+    Connection connect(const Slot &slot) {
       Lock lock(entriesMutex);
       auto conn = makeConnection();
       entries.emplace_back(Entry(slot, conn));
       return conn;
     }

-    ConnPtr connect(Slot &&slot) {
+    Connection connect(Slot &&slot) {
       Lock lock(entriesMutex);
       auto conn = makeConnection();
       entries.emplace_back(Entry(std::move(slot), conn));
@@ -105,7 +105,7 @@
     /** In the case of connecting a member function with one or more parameters,
         then pass std::placeholders::_1, std::placeholders::_2 etc. */
     template <typename Instance, typename MembFunc, typename ...Plchs>
-    ConnPtr connect(Instance *instance, MembFunc Instance::*mf,
+    Connection connect(Instance *instance, MembFunc Instance::*mf,
                     Plchs &&...plchs) {
       Lock lock(entriesMutex);
       Slot slot = std::bind(mf, instance, std::forward<Plchs>(plchs)...);
@@ -116,7 +116,7 @@

     /// Connecting a signal will trigger all of its slots when this signal is
     /// triggered.
-    ConnPtr connect(Signal &signal) {
+    Connection connect(Signal &signal) {
       Lock lock(entriesMutex);
       auto conn = makeConnection();
       entries.emplace_back(Entry(&signal, conn));
@@ -128,7 +128,7 @@
       entries.clear();
     }

-    void disconnect(ConnPtr conn = nullptr) {
+    void disconnect(Connection conn = nullptr) {
       if (!conn) {
         clear();
         return;
@@ -168,8 +168,8 @@
     }

   private:
-    ConnPtr makeConnection() {
-      auto conn = std::make_shared<Connection>();
+    Connection makeConnection() {
+      auto conn = std::make_shared<ConnectionBase>();
       conn->deleter = [this, conn]{
         this->disconnect(conn);
       };


fixed compilation error

fixed compilation error

--- ngx_rtmp_live_module.c
+++ ngx_rtmp_live_module.c
@@ -219,9 +219,7 @@
     ngx_rtmp_live_ctx_t            *ctx, **cctx;
     ngx_rtmp_live_stream_t        **stream;
     ngx_rtmp_live_app_conf_t       *lacf;
-    ngx_rtmp_core_srv_conf_t       *cscf;
-
-    cscf = ngx_rtmp_get_module_srv_conf(s, ngx_rtmp_core_module);
+
     lacf = ngx_rtmp_get_module_app_conf(s, ngx_rtmp_live_module);
     if (lacf == NULL) {
         goto next;


Implement restart in vcl_hit.

Implement restart in vcl_hit.

Fixes #365

git-svn-id: 2c9807fa3ff65b17195bd55dc8a6c4261e10127b@3386 d4fa192b-c00b-0410-8231-f00ffab90ce4

--- bin/varnishd/cache_center.c
+++ bin/varnishd/cache_center.c
@@ -543,7 +543,9 @@
 		sp->step = STP_ERROR;
 		return (0);
 	case VCL_RET_RESTART:
-		INCOMPL();
+		sp->director = NULL;
+		sp->restarts++;
+		sp->step = STP_RECV;
 		return (0);
 	default:
 		WRONG("Illegal action in vcl_hit{}");


test/accept.c: test for multishot direct accept with wrong arg

Add a test for multishot direct accept, where don't set the file index
to IORING_FILE_INDEX_ALLOC.

Signed-off-by: Hao Xu <83f1fd80049157f4783893e94b7e479a9ba8b984@tencent.com>
Link: 78bc4c605ab20b7cd35b50b1f7b9147c125a4b42@gmail.com
Signed-off-by: Jens Axboe <cd8c6775e60d6f67a6984377324e5290df3d5358@kernel.dk>

--- test/accept.c
+++ test/accept.c
@@ -541,6 +541,43 @@
 	return ret;
 }

+static int test_accept_multishot_wrong_arg()
+{
+	struct io_uring m_io_uring;
+	struct io_uring_cqe *cqe;
+	struct io_uring_sqe *sqe;
+	int fd, ret;
+
+	ret = io_uring_queue_init(4, &m_io_uring, 0);
+	assert(ret >= 0);
+
+	fd = start_accept_listen(NULL, 0, 0);
+
+	sqe = io_uring_get_sqe(&m_io_uring);
+	io_uring_prep_multishot_accept_direct(sqe, fd, NULL, NULL, 0);
+	sqe->file_index = 1;
+	ret = io_uring_submit(&m_io_uring);
+	assert(ret == 1);
+
+	ret = io_uring_wait_cqe(&m_io_uring, &cqe);
+	assert(!ret);
+	if (cqe->res != -EINVAL) {
+		fprintf(stderr, "file index should be IORING_FILE_INDEX_ALLOC \
+				if its accept in multishot direct mode\n");
+		goto err;
+	}
+	io_uring_cqe_seen(&m_io_uring, cqe);
+
+	io_uring_queue_exit(&m_io_uring);
+	close(fd);
+	return 0;
+err:
+	io_uring_queue_exit(&m_io_uring);
+	close(fd);
+	return 1;
+}
+
+
 static int test_accept_nonblock(bool queue_before_connect, int count)
 {
 	struct io_uring m_io_uring;
@@ -673,6 +710,12 @@
 		return ret;
 	}

+	ret = test_accept_multishot_wrong_arg();
+	if (ret) {
+		fprintf(stderr, "test_accept_multishot_wrong_arg failed\n");
+		return ret;
+	}
+
 	ret = test_accept_sqpoll();
 	if (ret) {
 		fprintf(stderr, "test_accept_sqpoll failed\n");


Don't clobber output on HUP

Don't clobber output on HUP

--- bin/varnishlog/varnishlog.c
+++ bin/varnishlog/varnishlog.c
@@ -94,7 +94,7 @@
 	AN(LOG.w_arg);
 	AN(LOG.fo);
 	fclose(LOG.fo);
-	openout(0);
+	openout(1);
 	AN(LOG.fo);
 	return (0);
 }


subtitle: peek_Readline: fix peek offset

--- modules/demux/subtitle_helper.h
+++ modules/demux/subtitle_helper.h
@@ -23,7 +23,7 @@
     uint8_t *p_peek;
     ssize_t i_peek = stream_Peek( p_demuxstream, (const uint8_t **) &p_peek,
                                   *pi_offset + 2048 );
-    if( i_peek <= 0 )
+    if( i_peek < 0 || (uint64_t) i_peek < *pi_offset )
         return NULL;

     const uint64_t i_bufsize = (uint64_t) i_peek - *pi_offset;


cbson: add cbson.ObjectId.generation_time getter.

--- bindings/python/cbson-oid.c
+++ bindings/python/cbson-oid.c
@@ -16,6 +16,7 @@

 #include "cbson-oid.h"
+#include "cbson-util.h"

 static bson_context_t *gContext;
@@ -24,13 +25,15 @@
 #define cbson_oid_check(op) (Py_TYPE(op) == &cbson_oid_type)

-static PyObject *cbson_oid_tp_repr    (PyObject *obj);
-static PyObject *cbson_oid_tp_str     (PyObject *obj);
-static int       cbson_oid_tp_compare (PyObject *obj1,
-                                       PyObject *obj2);
-static long      cbson_oid_tp_hash    (PyObject *obj);
-static PyObject *cbson_oid_get_binary (PyObject *obj,
-                                       void     *data);
+static PyObject *cbson_oid_tp_repr             (PyObject *obj);
+static PyObject *cbson_oid_tp_str              (PyObject *obj);
+static int       cbson_oid_tp_compare          (PyObject *obj1,
+                                                PyObject *obj2);
+static long      cbson_oid_tp_hash             (PyObject *obj);
+static PyObject *cbson_oid_get_binary          (PyObject *obj,
+                                                void     *data);
+static PyObject *cbson_oid_get_generation_time (PyObject *obj,
+                                                void     *data);

 static PyTypeObject cbson_oid_type = {
@@ -65,6 +68,16 @@
      NULL,
      (char *)"12-byte binary representation of this ObjectId.",
      NULL },
+   { (char *)"generation_time",
+     cbson_oid_get_generation_time,
+     NULL,
+     (char *)
+      "A :class:`datetime.datetime` instance representing the time of\n"
+      "generation for this :class:`ObjectId`.\n"
+      "\n"
+      "The :class:`datetime.datetime` is timezone aware, and\n"
+      "represents the generation time in UTC. It is precise to the\n"
+      "second." },
    { NULL }
 };

@@ -138,6 +151,18 @@
 #else
    return PyString_FromStringAndSize((const char *)&oid->oid, sizeof oid->oid);
 #endif
+}
+
+
+static PyObject *
+cbson_oid_get_generation_time (PyObject *obj,
+                               void     *data)
+{
+   cbson_oid_t *oid = (cbson_oid_t *)obj;
+   bson_int64_t gentime;
+
+   gentime = bson_oid_get_time_t(&oid->oid);
+   return cbson_date_time_from_msec(gentime * 1000L);
 }


Fix for building Familiar interface with libgpewidget0 library.

--- modules/gui/familiar/familiar.c
+++ modules/gui/familiar/familiar.c
@@ -2,7 +2,7 @@
  * familiar.c : familiar plugin for vlc
  *****************************************************************************
  * Copyright (C) 2002 VideoLAN
- * $Id: familiar.c,v 1.13 2002/12/13 01:56:29 gbazin Exp $
+ * $Id: familiar.c,v 1.14 2002/12/14 23:17:56 jpsaman Exp $
  *
  * Authors: Jean-Paul Saman <jpsaman@wxs.nl>
  *
@@ -130,6 +130,10 @@
 static void Run( intf_thread_t *p_intf )
 {
 #ifdef HAVE_GPE_INIT_H
+    char  *p_args[] = { "" };
+    char **pp_args  = p_args;
+    int    i_args   = 1;
+
    /* Initialize GPE interface */
    if (gpe_application_init(&i_args, &pp_args) == FALSE)
         exit (1);


Removed unnecessary critical section

Removed unnecessary critical section

--- phovo/include/CPhotoconsistencyOdometryBiObjective.h
+++ phovo/include/CPhotoconsistencyOdometryBiObjective.h
@@ -418,35 +418,32 @@
             m_DepthComponentGain * ( target_depthGradient * jacobianProy * jacobianRt - jacobianRt_z );

           //Assign the pixel residual and jacobian to its corresponding row
-          #pragma omp critical
+          //Assign intensity jacobians
+          jacobians(i,0) = jacobianItensity(0,0);
+          jacobians(i,1) = jacobianItensity(0,1);
+          jacobians(i,2) = jacobianItensity(0,2);
+          jacobians(i,3) = jacobianItensity(0,3);
+          jacobians(i,4) = jacobianItensity(0,4);
+          jacobians(i,5) = jacobianItensity(0,5);
+
+          //Assign intensity residuals
+          residuals( nCols * transformed_r_int + transformed_c_int , 0 ) = intensity2 - intensity1;
+
+          //Assign depth jacobians
+          jacobians( 2*i, 0 ) = jacobianDepth(0,0);
+          jacobians( 2*i, 1 ) = jacobianDepth(0,1);
+          jacobians( 2*i, 2 ) = jacobianDepth(0,2);
+          jacobians( 2*i, 3 ) = jacobianDepth(0,3);
+          jacobians( 2*i, 4 ) = jacobianDepth(0,4);
+          jacobians( 2*i, 5 ) = jacobianDepth(0,5);
+
+          //Assign depth residuals
+          residuals (nCols * 2 * transformed_r_int + 2 * transformed_c_int, 0 ) =
+          m_DepthComponentGain * ( depth2 - depth1 );
+
+          if( m_VisualizeIterations )
           {
-            //Assign intensity jacobians
-            jacobians(i,0) = jacobianItensity(0,0);
-            jacobians(i,1) = jacobianItensity(0,1);
-            jacobians(i,2) = jacobianItensity(0,2);
-            jacobians(i,3) = jacobianItensity(0,3);
-            jacobians(i,4) = jacobianItensity(0,4);
-            jacobians(i,5) = jacobianItensity(0,5);
-
-            //Assign intensity residuals
-            residuals( nCols * transformed_r_int + transformed_c_int , 0 ) = intensity2 - intensity1;
-
-            //Assign depth jacobians
-            jacobians( 2*i, 0 ) = jacobianDepth(0,0);
-            jacobians( 2*i, 1 ) = jacobianDepth(0,1);
-            jacobians( 2*i, 2 ) = jacobianDepth(0,2);
-            jacobians( 2*i, 3 ) = jacobianDepth(0,3);
-            jacobians( 2*i, 4 ) = jacobianDepth(0,4);
-            jacobians( 2*i, 5 ) = jacobianDepth(0,5);
-
-            //Assign depth residuals
-            residuals (nCols * 2 * transformed_r_int + 2 * transformed_c_int, 0 ) =
-              m_DepthComponentGain * ( depth2 - depth1 );
-
-            if( m_VisualizeIterations )
-            {
-              warped_source_grayImage( transformed_r_int, transformed_c_int ) = intensity1;
-            }
+            warped_source_grayImage( transformed_r_int, transformed_c_int ) = intensity1;
           }
         }
       }


Don't forget to initialize 'id' field.

Don't forget to initialize 'id' field.

MFC after:	3 days

--- sbin/geom/class/raid3/geom_raid3.c
+++ sbin/geom/class/raid3/geom_raid3.c
@@ -173,6 +173,7 @@
 		return;
 	}
 	strlcpy(md.md_name, str, sizeof(md.md_name));
+	md.md_id = arc4random();
 	md.md_all = *nargs - 1;
 	md.md_mflags = 0;
 	md.md_dflags = 0;


[1] Added sanity unit test after doubting my own. [2] Sanity unit test PASSES.

error: pathspec 'Hazer/tst/unittest-sanity.c' did not match any file(s) known to git


VLCMediaType: Remove external and stream type

--- Headers/Public/VLCMLMedia.h
+++ Headers/Public/VLCMLMedia.h
@@ -31,24 +31,14 @@
 typedef NS_ENUM(NSUInteger, VLCMLThumbnailStatus);

 typedef NS_ENUM(UInt8, VLCMLMediaType) {
+    /**
+     * Unknown media type. Type is used to avoid 0 being a valid value
+     * Media that are discovered by the medialibrary will not be
+     * added to the collection when their type can't be determined
+     */
     VLCMLMediaTypeUnknown,
     VLCMLMediaTypeVideo,
-    VLCMLMediaTypeAudio,
-    /**
-     * External media, ie. media that were not discovered by the media
-     * library, but that were added manually by the user.
-     * These media are not analyzed, so their subtype, tracks, or other
-     * details are not known.
-     * They can, however, be used to store meta or be included in the
-     * playback history.
-     */
-    VLCMLMediaTypeExternal,
-    /**
-     * Represent a stream, which is a specific kind of External media.
-     * This type of media is also intended to be inserted manually by
-     * the user.
-     */
-    VLCMLMediaTypeStream
+    VLCMLMediaTypeAudio
 };

 typedef NS_ENUM(UInt8, VLCMLMediaSubtype) {


Fix deserialize in tcp admin

Fix deserialize in tcp admin

--- bundles/pubsub/pubsub_admin_tcp/src/pubsub_tcp_topic_receiver.c
+++ bundles/pubsub/pubsub_admin_tcp/src/pubsub_tcp_topic_receiver.c
@@ -537,7 +537,7 @@
             struct iovec deSerializeBuffer;
             deSerializeBuffer.iov_base = message->payload.payload;
             deSerializeBuffer.iov_len = message->payload.length;
-            celix_status_t status = msgSer->deserialize(msgSer->handle, &deSerializeBuffer, 0, &deSerializedMsg);
+            celix_status_t status = msgSer->deserialize(msgSer->handle, &deSerializeBuffer, 1, &deSerializedMsg);
             if (monitor) {
                 clock_gettime(CLOCK_REALTIME, &endSer);
             }