Commit 9c69a284 authored by Axel Auweter's avatar Axel Auweter
Browse files

Some Ubuntu fixes...

Trying to resolve some issues with Eclipse include parser.
parent c60a547f
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?fileVersion 4.0.0?>
<cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
<?fileVersion 4.0.0?><cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
<storageModule moduleId="org.eclipse.cdt.core.settings">
<cconfiguration id="cdt.managedbuild.toolchain.gnu.base.663838804">
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.toolchain.gnu.base.663838804" moduleId="org.eclipse.cdt.core.settings" name="Default">
......@@ -25,6 +23,7 @@
<tool id="cdt.managedbuild.tool.gnu.cpp.compiler.base.265454218" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.base">
<option id="gnu.cpp.compiler.option.include.paths.122623253" name="Include paths (-I)" superClass="gnu.cpp.compiler.option.include.paths" valueType="includePath">
<listOptionValue builtIn="false" value="/usr/include"/>
<listOptionValue builtIn="false" value="/usr/include/x86_64-linux-gnu"/>
<listOptionValue builtIn="false" value="/usr/include/c++/4.7"/>
<listOptionValue builtIn="false" value="../../../mosquitto-1.1/lib"/>
</option>
......@@ -33,6 +32,7 @@
<tool id="cdt.managedbuild.tool.gnu.c.compiler.base.1073502011" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.base">
<option id="gnu.c.compiler.option.include.paths.1512580429" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" valueType="includePath">
<listOptionValue builtIn="false" value="/usr/include"/>
<listOptionValue builtIn="false" value="/usr/include/x86_64-linux-gnu"/>
<listOptionValue builtIn="false" value="/usr/include/c++/4.2.1"/>
<listOptionValue builtIn="false" value="../../../mosquitto-1.1/lib"/>
</option>
......@@ -172,6 +172,7 @@
<tool id="cdt.managedbuild.tool.gnu.assembler.base.2036029009" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.base">
<option id="gnu.both.asm.option.include.paths.1033764067" name="Include paths (-I)" superClass="gnu.both.asm.option.include.paths" valueType="includePath">
<listOptionValue builtIn="false" value="../../../mosquitto-1.1/lib"/>
<listOptionValue builtIn="false" value="/usr/include/x86_64-linux-gnu"/>
</option>
<inputType id="cdt.managedbuild.tool.gnu.assembler.input.1248959187" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
</tool>
......
......@@ -107,14 +107,16 @@ void spew() {
}
/* Read data into buffer */
fread(data, len, 1, fp);
if(fread(data, len, 1, fp) != (size_t)len) {
fprintf(stderr, "Warning: could not read until end of file.\n");
}
/* Send the message */
if(mosquitto_publish(mosq, NULL, tmpFilePath, len, data, 0, false) != MOSQ_ERR_SUCCESS) {
fprintf(stderr, "Warning: cannot send message.\n");
}
else {
printf("Sent %lld bytes...\n", len);
printf("Sent %lld bytes...\n", (long long)len);
}
/* Free buffer */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment